Commit b48fd568 authored by Linus Walleij's avatar Linus Walleij

drm: mcde: Fix forgotten user of drm->dev_private

Unable to handle kernel NULL pointer dereference at virtual address 00000918
pgd = (ptrval)
[00000918] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.7.0-15001-gfa384b50b96b-dirty #514
Hardware name: ST-Ericsson Ux5x0 platform (Device Tree Support)
PC is at mcde_display_enable+0x78/0x7c0
LR is at mcde_display_enable+0x78/0x7c0

Fix this by using to_mcde() as in other functions.

Fixes: fd7ee85c ("drm/mcde: Don't use drm_device->dev_private")
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200613223027.4189309-2-linus.walleij@linaro.org
parent b984b6d8
...@@ -812,7 +812,7 @@ static void mcde_display_enable(struct drm_simple_display_pipe *pipe, ...@@ -812,7 +812,7 @@ static void mcde_display_enable(struct drm_simple_display_pipe *pipe,
struct drm_crtc *crtc = &pipe->crtc; struct drm_crtc *crtc = &pipe->crtc;
struct drm_plane *plane = &pipe->plane; struct drm_plane *plane = &pipe->plane;
struct drm_device *drm = crtc->dev; struct drm_device *drm = crtc->dev;
struct mcde *mcde = drm->dev_private; struct mcde *mcde = to_mcde(drm);
const struct drm_display_mode *mode = &cstate->mode; const struct drm_display_mode *mode = &cstate->mode;
struct drm_framebuffer *fb = plane->state->fb; struct drm_framebuffer *fb = plane->state->fb;
u32 format = fb->format->format; u32 format = fb->format->format;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment