Skip to content

Commit 1ed9261

Browse files
committed
Merge tag 'drm-msm-next-2024-11-04' of https://gitlab.freedesktop.org/drm/msm into drm-next
Late updates for v6.13 MDSS: - cleanup UBWC registers handling DP: - Mass-rename the symbols DPU: - SSPP handling cleanup - Move kerneldoc comments from headers to source files - Misc small fixes Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGuGL6k3CKXZ0Qv-FTQ589+_PWNtid6i7MmVJLopBm2sYg@mail.gmail.com
2 parents bf99ceb + 86313a9 commit 1ed9261

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2626
-2643
lines changed

drivers/gpu/drm/msm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ DISPLAY_HEADERS = \
211211
generated/mdp4.xml.h \
212212
generated/mdp5.xml.h \
213213
generated/mdp_common.xml.h \
214+
generated/mdss.xml.h \
214215
generated/sfpb.xml.h
215216

216217
$(addprefix $(obj)/,$(adreno-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))

drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,72 +8,26 @@
88
#include "dpu_kms.h"
99
#include "dpu_hw_interrupts.h"
1010

11-
/**
12-
* dpu_core_irq_preinstall - perform pre-installation of core IRQ handler
13-
* @kms: MSM KMS handle
14-
* @return: none
15-
*/
1611
void dpu_core_irq_preinstall(struct msm_kms *kms);
1712

18-
/**
19-
* dpu_core_irq_uninstall - uninstall core IRQ handler
20-
* @kms: MSM KMS handle
21-
* @return: none
22-
*/
2313
void dpu_core_irq_uninstall(struct msm_kms *kms);
2414

25-
/**
26-
* dpu_core_irq - core IRQ handler
27-
* @kms: MSM KMS handle
28-
* @return: interrupt handling status
29-
*/
3015
irqreturn_t dpu_core_irq(struct msm_kms *kms);
3116

32-
/**
33-
* dpu_core_irq_read - IRQ helper function for reading IRQ status
34-
* @dpu_kms: DPU handle
35-
* @irq_idx: irq index
36-
* @return: non-zero if irq detected; otherwise no irq detected
37-
*/
3817
u32 dpu_core_irq_read(
3918
struct dpu_kms *dpu_kms,
4019
unsigned int irq_idx);
4120

42-
/**
43-
* dpu_core_irq_register_callback - For registering callback function on IRQ
44-
* interrupt
45-
* @dpu_kms: DPU handle
46-
* @irq_idx: irq index
47-
* @irq_cb: IRQ callback funcion.
48-
* @irq_arg: IRQ callback argument.
49-
* @return: 0 for success registering callback, otherwise failure
50-
*
51-
* This function supports registration of multiple callbacks for each interrupt.
52-
*/
5321
int dpu_core_irq_register_callback(
5422
struct dpu_kms *dpu_kms,
5523
unsigned int irq_idx,
5624
void (*irq_cb)(void *arg),
5725
void *irq_arg);
5826

59-
/**
60-
* dpu_core_irq_unregister_callback - For unregistering callback function on IRQ
61-
* interrupt
62-
* @dpu_kms: DPU handle
63-
* @irq_idx: irq index
64-
* @return: 0 for success registering callback, otherwise failure
65-
*
66-
* This function supports registration of multiple callbacks for each interrupt.
67-
*/
6827
int dpu_core_irq_unregister_callback(
6928
struct dpu_kms *dpu_kms,
7029
unsigned int irq_idx);
7130

72-
/**
73-
* dpu_debugfs_core_irq_init - register core irq debugfs
74-
* @dpu_kms: pointer to kms
75-
* @parent: debugfs directory root
76-
*/
7731
void dpu_debugfs_core_irq_init(struct dpu_kms *dpu_kms,
7832
struct dentry *parent);
7933

drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static u64 _dpu_core_perf_calc_clk(const struct dpu_perf_cfg *perf_cfg,
8080

8181
mode = &state->adjusted_mode;
8282

83-
crtc_clk = mode->vtotal * mode->hdisplay * drm_mode_vrefresh(mode);
83+
crtc_clk = (u64)mode->vtotal * mode->hdisplay * drm_mode_vrefresh(mode);
8484

8585
drm_atomic_crtc_for_each_plane(plane, crtc) {
8686
pstate = to_dpu_plane_state(plane->state);
@@ -140,6 +140,12 @@ static void _dpu_core_perf_calc_crtc(const struct dpu_core_perf *core_perf,
140140
perf->max_per_pipe_ib, perf->bw_ctl);
141141
}
142142

143+
/**
144+
* dpu_core_perf_crtc_check - validate performance of the given crtc state
145+
* @crtc: Pointer to crtc
146+
* @state: Pointer to new crtc state
147+
* return: zero if success, or error code otherwise
148+
*/
143149
int dpu_core_perf_crtc_check(struct drm_crtc *crtc,
144150
struct drm_crtc_state *state)
145151
{
@@ -301,6 +307,12 @@ static u64 _dpu_core_perf_get_core_clk_rate(struct dpu_kms *kms)
301307
return clk_rate;
302308
}
303309

310+
/**
311+
* dpu_core_perf_crtc_update - update performance of the given crtc
312+
* @crtc: Pointer to crtc
313+
* @params_changed: true if crtc parameters are modified
314+
* return: zero if success, or error code otherwise
315+
*/
304316
int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
305317
int params_changed)
306318
{
@@ -446,6 +458,11 @@ static const struct file_operations dpu_core_perf_mode_fops = {
446458
.write = _dpu_core_perf_mode_write,
447459
};
448460

461+
/**
462+
* dpu_core_perf_debugfs_init - initialize debugfs for core performance context
463+
* @dpu_kms: Pointer to the dpu_kms struct
464+
* @parent: Pointer to parent debugfs
465+
*/
449466
int dpu_core_perf_debugfs_init(struct dpu_kms *dpu_kms, struct dentry *parent)
450467
{
451468
struct dpu_core_perf *perf = &dpu_kms->perf;
@@ -482,6 +499,12 @@ int dpu_core_perf_debugfs_init(struct dpu_kms *dpu_kms, struct dentry *parent)
482499
}
483500
#endif
484501

502+
/**
503+
* dpu_core_perf_init - initialize the given core performance context
504+
* @perf: Pointer to core performance context
505+
* @perf_cfg: Pointer to platform performance configuration
506+
* @max_core_clk_rate: Maximum core clock rate
507+
*/
485508
int dpu_core_perf_init(struct dpu_core_perf *perf,
486509
const struct dpu_perf_cfg *perf_cfg,
487510
unsigned long max_core_clk_rate)

drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -54,47 +54,20 @@ struct dpu_core_perf {
5454
u64 fix_core_ab_vote;
5555
};
5656

57-
/**
58-
* dpu_core_perf_crtc_check - validate performance of the given crtc state
59-
* @crtc: Pointer to crtc
60-
* @state: Pointer to new crtc state
61-
* return: zero if success, or error code otherwise
62-
*/
6357
int dpu_core_perf_crtc_check(struct drm_crtc *crtc,
6458
struct drm_crtc_state *state);
6559

66-
/**
67-
* dpu_core_perf_crtc_update - update performance of the given crtc
68-
* @crtc: Pointer to crtc
69-
* @params_changed: true if crtc parameters are modified
70-
* return: zero if success, or error code otherwise
71-
*/
7260
int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
7361
int params_changed);
7462

75-
/**
76-
* dpu_core_perf_crtc_release_bw - release bandwidth of the given crtc
77-
* @crtc: Pointer to crtc
78-
*/
7963
void dpu_core_perf_crtc_release_bw(struct drm_crtc *crtc);
8064

81-
/**
82-
* dpu_core_perf_init - initialize the given core performance context
83-
* @perf: Pointer to core performance context
84-
* @perf_cfg: Pointer to platform performance configuration
85-
* @max_core_clk_rate: Maximum core clock rate
86-
*/
8765
int dpu_core_perf_init(struct dpu_core_perf *perf,
8866
const struct dpu_perf_cfg *perf_cfg,
8967
unsigned long max_core_clk_rate);
9068

9169
struct dpu_kms;
9270

93-
/**
94-
* dpu_core_perf_debugfs_init - initialize debugfs for core performance context
95-
* @dpu_kms: Pointer to the dpu_kms struct
96-
* @debugfs_parent: Pointer to parent debugfs
97-
*/
9871
int dpu_core_perf_debugfs_init(struct dpu_kms *dpu_kms, struct dentry *parent);
9972

10073
#endif /* _DPU_CORE_PERF_H_ */

drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,10 @@ static void _dpu_crtc_complete_flip(struct drm_crtc *crtc)
572572
spin_unlock_irqrestore(&dev->event_lock, flags);
573573
}
574574

575+
/**
576+
* dpu_crtc_get_intf_mode - get interface mode of the given crtc
577+
* @crtc: Pointert to crtc
578+
*/
575579
enum dpu_intf_mode dpu_crtc_get_intf_mode(struct drm_crtc *crtc)
576580
{
577581
struct drm_encoder *encoder;
@@ -594,6 +598,10 @@ enum dpu_intf_mode dpu_crtc_get_intf_mode(struct drm_crtc *crtc)
594598
return INTF_MODE_NONE;
595599
}
596600

601+
/**
602+
* dpu_crtc_vblank_callback - called on vblank irq, issues completion events
603+
* @crtc: Pointer to drm crtc object
604+
*/
597605
void dpu_crtc_vblank_callback(struct drm_crtc *crtc)
598606
{
599607
struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
@@ -704,6 +712,10 @@ void dpu_crtc_frame_event_cb(struct drm_crtc *crtc, u32 event)
704712
kthread_queue_work(priv->event_thread[crtc_id].worker, &fevent->work);
705713
}
706714

715+
/**
716+
* dpu_crtc_complete_commit - callback signalling completion of current commit
717+
* @crtc: Pointer to drm crtc object
718+
*/
707719
void dpu_crtc_complete_commit(struct drm_crtc *crtc)
708720
{
709721
trace_dpu_crtc_complete_commit(DRMID(crtc));
@@ -934,6 +946,10 @@ static int _dpu_crtc_wait_for_frame_done(struct drm_crtc *crtc)
934946
return rc;
935947
}
936948

949+
/**
950+
* dpu_crtc_commit_kickoff - trigger kickoff of the commit for this crtc
951+
* @crtc: Pointer to drm crtc object
952+
*/
937953
void dpu_crtc_commit_kickoff(struct drm_crtc *crtc)
938954
{
939955
struct drm_encoder *encoder;
@@ -1243,6 +1259,11 @@ static enum drm_mode_status dpu_crtc_mode_valid(struct drm_crtc *crtc,
12431259
4096);
12441260
}
12451261

1262+
/**
1263+
* dpu_crtc_vblank - enable or disable vblanks for this crtc
1264+
* @crtc: Pointer to drm crtc object
1265+
* @en: true to enable vblanks, false to disable
1266+
*/
12461267
int dpu_crtc_vblank(struct drm_crtc *crtc, bool en)
12471268
{
12481269
struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
@@ -1462,7 +1483,15 @@ static const struct drm_crtc_helper_funcs dpu_crtc_helper_funcs = {
14621483
.get_scanout_position = dpu_crtc_get_scanout_position,
14631484
};
14641485

1465-
/* initialize crtc */
1486+
/**
1487+
* dpu_crtc_init - create a new crtc object
1488+
* @dev: dpu device
1489+
* @plane: base plane
1490+
* @cursor: cursor plane
1491+
* @return: new crtc object or error
1492+
*
1493+
* initialize CRTC
1494+
*/
14661495
struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,
14671496
struct drm_plane *cursor)
14681497
{

drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -239,55 +239,17 @@ static inline int dpu_crtc_frame_pending(struct drm_crtc *crtc)
239239
return crtc ? atomic_read(&to_dpu_crtc(crtc)->frame_pending) : -EINVAL;
240240
}
241241

242-
/**
243-
* dpu_crtc_vblank - enable or disable vblanks for this crtc
244-
* @crtc: Pointer to drm crtc object
245-
* @en: true to enable vblanks, false to disable
246-
*/
247242
int dpu_crtc_vblank(struct drm_crtc *crtc, bool en);
248243

249-
/**
250-
* dpu_crtc_vblank_callback - called on vblank irq, issues completion events
251-
* @crtc: Pointer to drm crtc object
252-
*/
253244
void dpu_crtc_vblank_callback(struct drm_crtc *crtc);
254245

255-
/**
256-
* dpu_crtc_commit_kickoff - trigger kickoff of the commit for this crtc
257-
* @crtc: Pointer to drm crtc object
258-
*/
259246
void dpu_crtc_commit_kickoff(struct drm_crtc *crtc);
260247

261-
/**
262-
* dpu_crtc_complete_commit - callback signalling completion of current commit
263-
* @crtc: Pointer to drm crtc object
264-
*/
265248
void dpu_crtc_complete_commit(struct drm_crtc *crtc);
266249

267-
/**
268-
* dpu_crtc_init - create a new crtc object
269-
* @dev: dpu device
270-
* @plane: base plane
271-
* @cursor: cursor plane
272-
* @Return: new crtc object or error
273-
*/
274250
struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,
275251
struct drm_plane *cursor);
276252

277-
/**
278-
* dpu_crtc_register_custom_event - api for enabling/disabling crtc event
279-
* @kms: Pointer to dpu_kms
280-
* @crtc_drm: Pointer to crtc object
281-
* @event: Event that client is interested
282-
* @en: Flag to enable/disable the event
283-
*/
284-
int dpu_crtc_register_custom_event(struct dpu_kms *kms,
285-
struct drm_crtc *crtc_drm, u32 event, bool en);
286-
287-
/**
288-
* dpu_crtc_get_intf_mode - get interface mode of the given crtc
289-
* @crtc: Pointert to crtc
290-
*/
291253
enum dpu_intf_mode dpu_crtc_get_intf_mode(struct drm_crtc *crtc);
292254

293255
/**

0 commit comments

Comments
 (0)