Skip to content

Commit f7bf6bd

Browse files
committed
Merge tag 'drm-misc-fixes-2025-05-15' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
Short summary of fixes pull: dma-buf: - Avoid memory reordering in fence handling ivpu: - Fix buffer size in debugfs code meson: - Avoid integer overflow in mode-clock calculations panel-mipi-dbi: - Fix output with drm_client_setup_with_fourcc() Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://lore.kernel.org/r/20250515125534.GA41174@linux.fritz.box
2 parents 34f7151 + 72c7d62 commit f7bf6bd

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

drivers/accel/ivpu/ivpu_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ priority_bands_fops_write(struct file *file, const char __user *user_buf, size_t
455455
if (ret < 0)
456456
return ret;
457457

458-
buf[size] = '\0';
458+
buf[ret] = '\0';
459459
ret = sscanf(buf, "%u %u %u %u", &band, &grace_period, &process_grace_period,
460460
&process_quantum);
461461
if (ret != 4)

drivers/dma-buf/dma-resv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,9 @@ void dma_resv_add_fence(struct dma_resv *obj, struct dma_fence *fence,
320320
count++;
321321

322322
dma_resv_list_set(fobj, i, fence, usage);
323-
/* pointer update must be visible before we extend the num_fences */
324-
smp_store_mb(fobj->num_fences, count);
323+
/* fence update must be visible before we extend the num_fences */
324+
smp_wmb();
325+
fobj->num_fences = count;
325326
}
326327
EXPORT_SYMBOL(dma_resv_add_fence);
327328

drivers/gpu/drm/meson/meson_encoder_hdmi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void meson_encoder_hdmi_set_vclk(struct meson_encoder_hdmi *encoder_hdmi,
7575
unsigned long long venc_freq;
7676
unsigned long long hdmi_freq;
7777

78-
vclk_freq = mode->clock * 1000;
78+
vclk_freq = mode->clock * 1000ULL;
7979

8080
/* For 420, pixel clock is half unlike venc clock */
8181
if (encoder_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYYVYY8_0_5X24)
@@ -123,7 +123,7 @@ static enum drm_mode_status meson_encoder_hdmi_mode_valid(struct drm_bridge *bri
123123
struct meson_encoder_hdmi *encoder_hdmi = bridge_to_meson_encoder_hdmi(bridge);
124124
struct meson_drm *priv = encoder_hdmi->priv;
125125
bool is_hdmi2_sink = display_info->hdmi.scdc.supported;
126-
unsigned long long clock = mode->clock * 1000;
126+
unsigned long long clock = mode->clock * 1000ULL;
127127
unsigned long long phy_freq;
128128
unsigned long long vclk_freq;
129129
unsigned long long venc_freq;

drivers/gpu/drm/tiny/panel-mipi-dbi.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,10 @@ static int panel_mipi_dbi_spi_probe(struct spi_device *spi)
390390

391391
spi_set_drvdata(spi, drm);
392392

393-
drm_client_setup(drm, NULL);
393+
if (bpp == 16)
394+
drm_client_setup_with_fourcc(drm, DRM_FORMAT_RGB565);
395+
else
396+
drm_client_setup_with_fourcc(drm, DRM_FORMAT_RGB888);
394397

395398
return 0;
396399
}

0 commit comments

Comments
 (0)