[SRU][A][PATCH 0/1] Fix for LP#1738334 - hibmc regression

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][A][PATCH 0/1] Fix for LP#1738334 - hibmc regression

Daniel Axtens
[SRU Justification]

[Impact]
On Artful kernels, X fails to start and a kernel splat is printed.

This is because ea642c3216cb ("drm/ttm: add io_mem_pfn callback") is
incomplete: the hisilicon hibmc driver does not contain the callback
and so the kernel tries to execute code at NULL.

[Fix]
There is a discussion and potential fix at
https://lists.freedesktop.org/archives/dri-devel/2017-November/159002.html
The fix hasn't landed yet and it looks like they're going to
re-engineer the entire section instead.

Rather than wait for that and deal with the massive regression
potential, the fix I have picked to submit is very very minimal and
touches only hibmc.

[Regression Potential]
Minimal - fix only touches hibmc driver. Tested on D05 board.

[Testcase]
Install patched kernel, try to start X. If it succeeds, the fix
works. If there's a kernel splat and X does not start, the fix does
not work.

[Notes]
HiSilicon would really like this fix in Artful in such time so that
when the next 16.04 point release ships in February, the HWE kernel
will work with Xorg.

Michal Srb (1):
  UBUNTU: SAUCE: drm: hibmc: Initialize the hibmc_bo_driver.io_mem_pfn

 drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 1 +
 1 file changed, 1 insertion(+)

--
2.11.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][A][PATCH 1/1] UBUNTU: SAUCE: drm: hibmc: Initialize the hibmc_bo_driver.io_mem_pfn

Daniel Axtens
From: Michal Srb <[hidden email]>

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 <[hidden email]>
(cherry-picked from https://lists.freedesktop.org/archives/dri-devel/2017-November/159002.html)
[upstream still to land on a particular solution, this is the minimal fix]
Signed-off-by: Daniel Axtens <[hidden email]>
---
 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
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

NACK: [SRU][A][PATCH 0/1] Fix for LP#1738334 - hibmc regression

Kleber Souza
In reply to this post by Daniel Axtens
On 12/15/17 11:41, Daniel Axtens wrote:

> [SRU Justification]
>
> [Impact]
> On Artful kernels, X fails to start and a kernel splat is printed.
>
> This is because ea642c3216cb ("drm/ttm: add io_mem_pfn callback") is
> incomplete: the hisilicon hibmc driver does not contain the callback
> and so the kernel tries to execute code at NULL.
>
> [Fix]
> There is a discussion and potential fix at
> https://lists.freedesktop.org/archives/dri-devel/2017-November/159002.html
> The fix hasn't landed yet and it looks like they're going to
> re-engineer the entire section instead.
>
> Rather than wait for that and deal with the massive regression
> potential, the fix I have picked to submit is very very minimal and
> touches only hibmc.
>
> [Regression Potential]
> Minimal - fix only touches hibmc driver. Tested on D05 board.
>
> [Testcase]
> Install patched kernel, try to start X. If it succeeds, the fix
> works. If there's a kernel splat and X does not start, the fix does
> not work.
>
> [Notes]
> HiSilicon would really like this fix in Artful in such time so that
> when the next 16.04 point release ships in February, the HWE kernel
> will work with Xorg.
>
> Michal Srb (1):
>   UBUNTU: SAUCE: drm: hibmc: Initialize the hibmc_bo_driver.io_mem_pfn
>
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 1 +
>  1 file changed, 1 insertion(+)
>

This patchset has been resent.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team