Skip to content

Commit 5fed085

Browse files
committed
Merge tag 'drm-misc-fixes-2024-06-26' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
drm-misc-fixes for v6.10-rc6: - nouveau tv mode fixes. - Add KOE TX26D202VM0BWA timings. - Fix fb_info when vmalloc is used, regression from CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM. Signed-off-by: Dave Airlie <[email protected]> From: Maarten Lankhorst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents f266106 + 66edf3f commit 5fed085

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

drivers/gpu/drm/drm_fb_helper.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,9 @@ struct fb_info *drm_fb_helper_alloc_info(struct drm_fb_helper *fb_helper)
524524
if (!info)
525525
return ERR_PTR(-ENOMEM);
526526

527+
if (!drm_leak_fbdev_smem)
528+
info->flags |= FBINFO_HIDE_SMEM_START;
529+
527530
ret = fb_alloc_cmap(&info->cmap, 256, 0);
528531
if (ret)
529532
goto err_release;
@@ -1860,9 +1863,6 @@ __drm_fb_helper_initial_config_and_unlock(struct drm_fb_helper *fb_helper)
18601863
info = fb_helper->info;
18611864
info->var.pixclock = 0;
18621865

1863-
if (!drm_leak_fbdev_smem)
1864-
info->flags |= FBINFO_HIDE_SMEM_START;
1865-
18661866
/* Need to drop locks to avoid recursive deadlock in
18671867
* register_framebuffer. This is ok because the only thing left to do is
18681868
* register the fbdev emulation instance in kernel_fb_helper_list. */

drivers/gpu/drm/drm_fbdev_dma.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper,
130130
info->flags |= FBINFO_READS_FAST; /* signal caching */
131131
info->screen_size = sizes->surface_height * fb->pitches[0];
132132
info->screen_buffer = map.vaddr;
133-
info->fix.smem_start = page_to_phys(virt_to_page(info->screen_buffer));
133+
if (!(info->flags & FBINFO_HIDE_SMEM_START)) {
134+
if (!drm_WARN_ON(dev, is_vmalloc_addr(info->screen_buffer)))
135+
info->fix.smem_start = page_to_phys(virt_to_page(info->screen_buffer));
136+
}
134137
info->fix.smem_len = info->screen_size;
135138

136139
return 0;

drivers/gpu/drm/nouveau/dispnv04/tvnv17.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ static int nv17_tv_get_ld_modes(struct drm_encoder *encoder,
209209
struct drm_display_mode *mode;
210210

211211
mode = drm_mode_duplicate(encoder->dev, tv_mode);
212+
if (!mode)
213+
continue;
212214

213215
mode->clock = tv_norm->tv_enc_mode.vrefresh *
214216
mode->htotal / 1000 *
@@ -258,13 +260,17 @@ static int nv17_tv_get_hd_modes(struct drm_encoder *encoder,
258260
if (modes[i].hdisplay == output_mode->hdisplay &&
259261
modes[i].vdisplay == output_mode->vdisplay) {
260262
mode = drm_mode_duplicate(encoder->dev, output_mode);
263+
if (!mode)
264+
continue;
261265
mode->type |= DRM_MODE_TYPE_PREFERRED;
262266

263267
} else {
264268
mode = drm_cvt_mode(encoder->dev, modes[i].hdisplay,
265269
modes[i].vdisplay, 60, false,
266270
(output_mode->flags &
267271
DRM_MODE_FLAG_INTERLACE), false);
272+
if (!mode)
273+
continue;
268274
}
269275

270276
/* CVT modes are sometimes unsuitable... */

drivers/gpu/drm/panel/panel-simple.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2752,6 +2752,7 @@ static const struct display_timing koe_tx26d202vm0bwa_timing = {
27522752
.vfront_porch = { 3, 5, 10 },
27532753
.vback_porch = { 2, 5, 10 },
27542754
.vsync_len = { 5, 5, 5 },
2755+
.flags = DISPLAY_FLAGS_DE_HIGH,
27552756
};
27562757

27572758
static const struct panel_desc koe_tx26d202vm0bwa = {

0 commit comments

Comments
 (0)