Message ID | 20180103232356.4466-2-dja@axtens.net |
---|---|
State | New |
Headers | show |
Series | Fix for LP#1738334 - hibmc regression | expand |
The fix is small and corresponds to what was posted upstream. Acked-by: Paolo Pisati <paolo.pisati@canonical.com> On Thu, Jan 4, 2018 at 12:23 AM, Daniel Axtens <daniel.axtens@canonical.com> wrote: > From: Michal Srb <msrb@suse.com> > > BugLink: https://bugs.launchpad.net/bugs/1738334 > > The io_mem_pfn field was added in ea642c3216cb2a60d1c0e760ae47ee85c9c16447 and > is used unconditionally. Most drivers were updated to set it to the default > implementation ttm_bo_default_io_mem_pfn, but hibmc was not. > > This fixes crash in ttm_bo_vm_fault when hibmc driver is used. > > Signed-off-by: Michal Srb <msrb@suse.com> > (cherry-picked from https://lists.freedesktop.org/archives/dri-devel/2017-November/159002.html) > [upstream fix at > https://lists.freedesktop.org/archives/dri-devel/2017-December/161184.html > is quite intrusive - this is the minimal fix] > Signed-off-by: Daniel Axtens <daniel.axtens@canonical.com> > --- > drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c > index ac457c779caa..1a6c2a34771a 100644 > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c > @@ -243,6 +243,7 @@ struct ttm_bo_driver hibmc_bo_driver = { > .verify_access = hibmc_bo_verify_access, > .io_mem_reserve = &hibmc_ttm_io_mem_reserve, > .io_mem_free = NULL, > + .io_mem_pfn = ttm_bo_default_io_mem_pfn, > }; > > int hibmc_mm_init(struct hibmc_drm_private *hibmc) > -- > 2.11.0 > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c index ac457c779caa..1a6c2a34771a 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c @@ -243,6 +243,7 @@ struct ttm_bo_driver hibmc_bo_driver = { .verify_access = hibmc_bo_verify_access, .io_mem_reserve = &hibmc_ttm_io_mem_reserve, .io_mem_free = NULL, + .io_mem_pfn = ttm_bo_default_io_mem_pfn, }; int hibmc_mm_init(struct hibmc_drm_private *hibmc)