Skip to content

Commit 43102a2

Browse files
committed
Merge tag 'drm-misc-fixes-2024-09-26' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
Short summary of fixes pull: atomic: - Use correct type when reading damage rectangles display: - Fix kernel docs dp-mst: - Fix DSC decompression detection hdmi: - Fix infoframe size panthor: - Fix locking sched: - Update maintainers - Fix race condition whne queueing up jobs sysfb: - Disable sysfb if framebuffer parent device is unknown vbox: - Fix VLA handling Signed-off-by: Dave Airlie <[email protected]> From: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 9852d85 + ad604f0 commit 43102a2

File tree

14 files changed

+56
-26
lines changed

14 files changed

+56
-26
lines changed

Documentation/gpu/drm-kms-helpers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Bridge Operations
181181
Bridge Connector Helper
182182
-----------------------
183183

184-
.. kernel-doc:: drivers/gpu/drm/drm_bridge_connector.c
184+
.. kernel-doc:: drivers/gpu/drm/display/drm_bridge_connector.c
185185
:doc: overview
186186

187187

@@ -204,7 +204,7 @@ MIPI-DSI bridge operation
204204
Bridge Connector Helper Reference
205205
---------------------------------
206206

207-
.. kernel-doc:: drivers/gpu/drm/drm_bridge_connector.c
207+
.. kernel-doc:: drivers/gpu/drm/display/drm_bridge_connector.c
208208
:export:
209209

210210
Panel-Bridge Helper Reference

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7832,6 +7832,8 @@ F: drivers/gpu/drm/xlnx/
78327832
DRM GPU SCHEDULER
78337833
M: Luben Tuikov <[email protected]>
78347834
M: Matthew Brost <[email protected]>
7835+
M: Danilo Krummrich <[email protected]>
7836+
M: Philipp Stanner <[email protected]>
78357837
78367838
S: Maintained
78377839
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git

drivers/firmware/sysfb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ static bool sysfb_unregister(void)
6767
void sysfb_disable(struct device *dev)
6868
{
6969
struct screen_info *si = &screen_info;
70+
struct device *parent;
7071

7172
mutex_lock(&disable_lock);
72-
if (!dev || dev == sysfb_parent_dev(si)) {
73+
parent = sysfb_parent_dev(si);
74+
if (!dev || !parent || dev == parent) {
7375
sysfb_unregister();
7476
disabled = true;
7577
}

drivers/gpu/drm/display/drm_dp_mst_topology.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6083,6 +6083,7 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
60836083
struct drm_dp_aux *immediate_upstream_aux;
60846084
struct drm_dp_mst_port *fec_port;
60856085
struct drm_dp_desc desc = {};
6086+
u8 upstream_dsc;
60866087
u8 endpoint_fec;
60876088
u8 endpoint_dsc;
60886089

@@ -6109,8 +6110,6 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
61096110

61106111
/* DP-to-DP peer device */
61116112
if (drm_dp_mst_is_virtual_dpcd(immediate_upstream_port)) {
6112-
u8 upstream_dsc;
6113-
61146113
if (drm_dp_dpcd_read(&port->aux,
61156114
DP_DSC_SUPPORT, &endpoint_dsc, 1) != 1)
61166115
return NULL;
@@ -6156,6 +6155,13 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
61566155
if (drm_dp_has_quirk(&desc, DP_DPCD_QUIRK_DSC_WITHOUT_VIRTUAL_DPCD)) {
61576156
u8 dpcd_ext[DP_RECEIVER_CAP_SIZE];
61586157

6158+
if (drm_dp_dpcd_read(immediate_upstream_aux,
6159+
DP_DSC_SUPPORT, &upstream_dsc, 1) != 1)
6160+
return NULL;
6161+
6162+
if (!(upstream_dsc & DP_DSC_DECOMPRESSION_IS_SUPPORTED))
6163+
return NULL;
6164+
61596165
if (drm_dp_read_dpcd_caps(immediate_upstream_aux, dpcd_ext) < 0)
61606166
return NULL;
61616167

drivers/gpu/drm/display/drm_hdmi_state_helper.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,6 @@ int drm_atomic_helper_connector_hdmi_check(struct drm_connector *connector,
521521
}
522522
EXPORT_SYMBOL(drm_atomic_helper_connector_hdmi_check);
523523

524-
#define HDMI_MAX_INFOFRAME_SIZE 29
525-
526524
static int clear_device_infoframe(struct drm_connector *connector,
527525
enum hdmi_infoframe_type type)
528526
{
@@ -563,7 +561,7 @@ static int write_device_infoframe(struct drm_connector *connector,
563561
{
564562
const struct drm_connector_hdmi_funcs *funcs = connector->hdmi.funcs;
565563
struct drm_device *dev = connector->dev;
566-
u8 buffer[HDMI_MAX_INFOFRAME_SIZE];
564+
u8 buffer[HDMI_INFOFRAME_SIZE(MAX)];
567565
int ret;
568566
int len;
569567

drivers/gpu/drm/drm_atomic_uapi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
543543
&state->fb_damage_clips,
544544
val,
545545
-1,
546-
sizeof(struct drm_rect),
546+
sizeof(struct drm_mode_rect),
547547
&replaced);
548548
return ret;
549549
} else if (property == plane->scaling_filter_property) {

drivers/gpu/drm/drm_debugfs.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,6 @@ static const struct file_operations drm_connector_fops = {
520520
.write = connector_write
521521
};
522522

523-
#define HDMI_MAX_INFOFRAME_SIZE 29
524-
525523
static ssize_t
526524
audio_infoframe_read(struct file *filp, char __user *ubuf, size_t count, loff_t *ppos)
527525
{
@@ -579,7 +577,7 @@ static ssize_t _f##_read_infoframe(struct file *filp, \
579577
struct drm_connector *connector; \
580578
union hdmi_infoframe *frame; \
581579
struct drm_device *dev; \
582-
u8 buf[HDMI_MAX_INFOFRAME_SIZE]; \
580+
u8 buf[HDMI_INFOFRAME_SIZE(MAX)]; \
583581
ssize_t len = 0; \
584582
\
585583
connector = filp->private_data; \

drivers/gpu/drm/panthor/panthor_sched.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3242,6 +3242,18 @@ int panthor_group_destroy(struct panthor_file *pfile, u32 group_handle)
32423242
return 0;
32433243
}
32443244

3245+
static struct panthor_group *group_from_handle(struct panthor_group_pool *pool,
3246+
u32 group_handle)
3247+
{
3248+
struct panthor_group *group;
3249+
3250+
xa_lock(&pool->xa);
3251+
group = group_get(xa_load(&pool->xa, group_handle));
3252+
xa_unlock(&pool->xa);
3253+
3254+
return group;
3255+
}
3256+
32453257
int panthor_group_get_state(struct panthor_file *pfile,
32463258
struct drm_panthor_group_get_state *get_state)
32473259
{
@@ -3253,7 +3265,7 @@ int panthor_group_get_state(struct panthor_file *pfile,
32533265
if (get_state->pad)
32543266
return -EINVAL;
32553267

3256-
group = group_get(xa_load(&gpool->xa, get_state->group_handle));
3268+
group = group_from_handle(gpool, get_state->group_handle);
32573269
if (!group)
32583270
return -EINVAL;
32593271

@@ -3384,7 +3396,7 @@ panthor_job_create(struct panthor_file *pfile,
33843396
job->call_info.latest_flush = qsubmit->latest_flush;
33853397
INIT_LIST_HEAD(&job->node);
33863398

3387-
job->group = group_get(xa_load(&gpool->xa, group_handle));
3399+
job->group = group_from_handle(gpool, group_handle);
33883400
if (!job->group) {
33893401
ret = -EINVAL;
33903402
goto err_put_job;

drivers/gpu/drm/scheduler/sched_entity.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ static void drm_sched_entity_wakeup(struct dma_fence *f,
380380
container_of(cb, struct drm_sched_entity, cb);
381381

382382
drm_sched_entity_clear_dep(f, cb);
383-
drm_sched_wakeup(entity->rq->sched, entity);
383+
drm_sched_wakeup(entity->rq->sched);
384384
}
385385

386386
/**
@@ -612,7 +612,7 @@ void drm_sched_entity_push_job(struct drm_sched_job *sched_job)
612612
if (drm_sched_policy == DRM_SCHED_POLICY_FIFO)
613613
drm_sched_rq_update_fifo(entity, submit_ts);
614614

615-
drm_sched_wakeup(entity->rq->sched, entity);
615+
drm_sched_wakeup(entity->rq->sched);
616616
}
617617
}
618618
EXPORT_SYMBOL(drm_sched_entity_push_job);

drivers/gpu/drm/scheduler/sched_main.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,15 +1013,12 @@ EXPORT_SYMBOL(drm_sched_job_cleanup);
10131013
/**
10141014
* drm_sched_wakeup - Wake up the scheduler if it is ready to queue
10151015
* @sched: scheduler instance
1016-
* @entity: the scheduler entity
10171016
*
10181017
* Wake up the scheduler if we can queue jobs.
10191018
*/
1020-
void drm_sched_wakeup(struct drm_gpu_scheduler *sched,
1021-
struct drm_sched_entity *entity)
1019+
void drm_sched_wakeup(struct drm_gpu_scheduler *sched)
10221020
{
1023-
if (drm_sched_can_queue(sched, entity))
1024-
drm_sched_run_job_queue(sched);
1021+
drm_sched_run_job_queue(sched);
10251022
}
10261023

10271024
/**

0 commit comments

Comments
 (0)