Skip to content

Commit 78fed39

Browse files
committed
Merge tag 'drm-misc-fixes-2021-12-16-1' of ssh://git.freedesktop.org/git/drm/drm-misc into drm-fixes
One null pointer dereference fix for ast, a pixel clock unit fix for simpledrm and a user-space regression revert for fb-helper Signed-off-by: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20211216082603.pm6yzlckmxvwnqyv@houat
2 parents c9f0322 + fea3fdf commit 78fed39

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

drivers/gpu/drm/ast/ast_mode.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,10 @@ static void ast_crtc_reset(struct drm_crtc *crtc)
11211121
if (crtc->state)
11221122
crtc->funcs->atomic_destroy_state(crtc, crtc->state);
11231123

1124-
__drm_atomic_helper_crtc_reset(crtc, &ast_state->base);
1124+
if (ast_state)
1125+
__drm_atomic_helper_crtc_reset(crtc, &ast_state->base);
1126+
else
1127+
__drm_atomic_helper_crtc_reset(crtc, NULL);
11251128
}
11261129

11271130
static struct drm_crtc_state *

drivers/gpu/drm/drm_fb_helper.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,13 @@ void drm_fb_helper_fill_info(struct fb_info *info,
17431743
sizes->fb_width, sizes->fb_height);
17441744

17451745
info->par = fb_helper;
1746-
snprintf(info->fix.id, sizeof(info->fix.id), "%s",
1746+
/*
1747+
* The DRM drivers fbdev emulation device name can be confusing if the
1748+
* driver name also has a "drm" suffix on it. Leading to names such as
1749+
* "simpledrmdrmfb" in /proc/fb. Unfortunately, it's an uAPI and can't
1750+
* be changed due user-space tools (e.g: pm-utils) matching against it.
1751+
*/
1752+
snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
17471753
fb_helper->dev->driver->name);
17481754

17491755
}

drivers/gpu/drm/tiny/simpledrm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ static struct drm_display_mode simpledrm_mode(unsigned int width,
458458
{
459459
struct drm_display_mode mode = { SIMPLEDRM_MODE(width, height) };
460460

461-
mode.clock = 60 /* Hz */ * mode.hdisplay * mode.vdisplay;
461+
mode.clock = mode.hdisplay * mode.vdisplay * 60 / 1000 /* kHz */;
462462
drm_mode_set_name(&mode);
463463

464464
return mode;

0 commit comments

Comments
 (0)