Skip to content

Commit 75eac7e

Browse files
committed
Merge tag 'drm-misc-fixes-2024-08-15' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
Short summary of fixes pull: panel: - dt-bindings style fixes panel-orientation: - add quirk for Any Loki Max - add quirk for Any Loki Zero rockchip: - inno-hdmi: fix infoframe upload v3d: - fix OOB access in v3d_csd_job_run() Signed-off-by: Dave Airlie <[email protected]> From: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 9370e43 + fd45cc6 commit 75eac7e

File tree

4 files changed

+30
-12
lines changed

4 files changed

+30
-12
lines changed

Documentation/devicetree/bindings/display/panel/samsung,atna33xc20.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ properties:
1818
# Samsung 13.3" FHD (1920x1080 pixels) eDP AMOLED panel
1919
- const: samsung,atna33xc20
2020
- items:
21-
- enum:
22-
# Samsung 14.5" WQXGA+ (2880x1800 pixels) eDP AMOLED panel
23-
- samsung,atna45af01
24-
# Samsung 14.5" 3K (2944x1840 pixels) eDP AMOLED panel
25-
- samsung,atna45dc02
26-
- const: samsung,atna33xc20
21+
- enum:
22+
# Samsung 14.5" WQXGA+ (2880x1800 pixels) eDP AMOLED panel
23+
- samsung,atna45af01
24+
# Samsung 14.5" 3K (2944x1840 pixels) eDP AMOLED panel
25+
- samsung,atna45dc02
26+
- const: samsung,atna33xc20
2727

2828
enable-gpios: true
2929
port: true

drivers/gpu/drm/drm_panel_orientation_quirks.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,18 @@ static const struct dmi_system_id orientation_data[] = {
208208
DMI_MATCH(DMI_BOARD_NAME, "KUN"),
209209
},
210210
.driver_data = (void *)&lcd1600x2560_rightside_up,
211+
}, { /* AYN Loki Max */
212+
.matches = {
213+
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ayn"),
214+
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Loki Max"),
215+
},
216+
.driver_data = (void *)&lcd1080x1920_leftside_up,
217+
}, { /* AYN Loki Zero */
218+
.matches = {
219+
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ayn"),
220+
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Loki Zero"),
221+
},
222+
.driver_data = (void *)&lcd1080x1920_leftside_up,
211223
}, { /* Chuwi HiBook (CWI514) */
212224
.matches = {
213225
DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),

drivers/gpu/drm/rockchip/inno_hdmi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ static int inno_hdmi_upload_frame(struct drm_connector *connector,
279279
const u8 *buffer, size_t len)
280280
{
281281
struct inno_hdmi *hdmi = connector_to_inno_hdmi(connector);
282-
u8 packed_frame[HDMI_MAXIMUM_INFO_FRAME_SIZE];
283282
ssize_t i;
284283

285284
if (type != HDMI_INFOFRAME_TYPE_AVI) {
@@ -291,8 +290,7 @@ static int inno_hdmi_upload_frame(struct drm_connector *connector,
291290
inno_hdmi_disable_frame(connector, type);
292291

293292
for (i = 0; i < len; i++)
294-
hdmi_writeb(hdmi, HDMI_CONTROL_PACKET_ADDR + i,
295-
packed_frame[i]);
293+
hdmi_writeb(hdmi, HDMI_CONTROL_PACKET_ADDR + i, buffer[i]);
296294

297295
return 0;
298296
}

drivers/gpu/drm/v3d/v3d_sched.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ v3d_csd_job_run(struct drm_sched_job *sched_job)
315315
struct v3d_dev *v3d = job->base.v3d;
316316
struct drm_device *dev = &v3d->drm;
317317
struct dma_fence *fence;
318-
int i, csd_cfg0_reg, csd_cfg_reg_count;
318+
int i, csd_cfg0_reg;
319319

320320
v3d->csd_job = job;
321321

@@ -335,9 +335,17 @@ v3d_csd_job_run(struct drm_sched_job *sched_job)
335335
v3d_switch_perfmon(v3d, &job->base);
336336

337337
csd_cfg0_reg = V3D_CSD_QUEUED_CFG0(v3d->ver);
338-
csd_cfg_reg_count = v3d->ver < 71 ? 6 : 7;
339-
for (i = 1; i <= csd_cfg_reg_count; i++)
338+
for (i = 1; i <= 6; i++)
340339
V3D_CORE_WRITE(0, csd_cfg0_reg + 4 * i, job->args.cfg[i]);
340+
341+
/* Although V3D 7.1 has an eighth configuration register, we are not
342+
* using it. Therefore, make sure it remains unused.
343+
*
344+
* XXX: Set the CFG7 register
345+
*/
346+
if (v3d->ver >= 71)
347+
V3D_CORE_WRITE(0, V3D_V7_CSD_QUEUED_CFG7, 0);
348+
341349
/* CFG0 write kicks off the job. */
342350
V3D_CORE_WRITE(0, csd_cfg0_reg, job->args.cfg[0]);
343351

0 commit comments

Comments
 (0)