Skip to content

Commit 00f2489

Browse files
committed
drm/msm: drop msm_kms_funcs::get_format() callback
Now as all subdrivers were converted to use common database of formats, drop the get_format() callback and use mdp_get_format() directly. Reviewed-by: Abhinav Kumar <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/590431/ Link: https://lore.kernel.org/r/[email protected]
1 parent b228501 commit 00f2489

File tree

8 files changed

+6
-14
lines changed

8 files changed

+6
-14
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static void dpu_encoder_phys_vid_setup_timing_engine(
274274

275275
drm_mode_to_intf_timing_params(phys_enc, &mode, &timing_params);
276276

277-
fmt = phys_enc->dpu_kms->base.funcs->get_format(&phys_enc->dpu_kms->base, fmt_fourcc, 0);
277+
fmt = mdp_get_format(&phys_enc->dpu_kms->base, fmt_fourcc, 0);
278278
DPU_DEBUG_VIDENC(phys_enc, "fmt_fourcc 0x%X\n", fmt_fourcc);
279279

280280
if (phys_enc->hw_cdm)
@@ -414,7 +414,7 @@ static void dpu_encoder_phys_vid_enable(struct dpu_encoder_phys *phys_enc)
414414

415415
ctl = phys_enc->hw_ctl;
416416
fmt_fourcc = dpu_encoder_get_drm_fmt(phys_enc);
417-
fmt = phys_enc->dpu_kms->base.funcs->get_format(&phys_enc->dpu_kms->base, fmt_fourcc, 0);
417+
fmt = mdp_get_format(&phys_enc->dpu_kms->base, fmt_fourcc, 0);
418418

419419
DPU_DEBUG_VIDENC(phys_enc, "\n");
420420

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,7 @@ static void dpu_encoder_phys_wb_setup(
326326

327327
wb_job = wb_enc->wb_job;
328328
format = msm_framebuffer_format(wb_enc->wb_job->fb);
329-
dpu_fmt = phys_enc->dpu_kms->base.funcs->get_format(&phys_enc->dpu_kms->base,
330-
format->pixel_format, wb_job->fb->modifier);
329+
dpu_fmt = mdp_get_format(&phys_enc->dpu_kms->base, format->pixel_format, wb_job->fb->modifier);
331330

332331
DPU_DEBUG("[mode_set:%d, \"%s\",%d,%d]\n",
333332
hw_wb->idx - WB_0, mode.name,
@@ -577,7 +576,7 @@ static void dpu_encoder_phys_wb_prepare_wb_job(struct dpu_encoder_phys *phys_enc
577576

578577
format = msm_framebuffer_format(job->fb);
579578

580-
wb_cfg->dest.format = phys_enc->dpu_kms->base.funcs->get_format(&phys_enc->dpu_kms->base,
579+
wb_cfg->dest.format = mdp_get_format(&phys_enc->dpu_kms->base,
581580
format->pixel_format, job->fb->modifier);
582581
if (!wb_cfg->dest.format) {
583582
/* this error should be detected during atomic_check */

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,6 @@ static const struct msm_kms_funcs kms_funcs = {
982982
.enable_vblank = dpu_kms_enable_vblank,
983983
.disable_vblank = dpu_kms_disable_vblank,
984984
.check_modified_format = dpu_format_check_modified_format,
985-
.get_format = mdp_get_format,
986985
.destroy = dpu_kms_destroy,
987986
.snapshot = dpu_kms_mdp_snapshot,
988987
#ifdef CONFIG_DEBUG_FS

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ static void _dpu_plane_color_fill(struct dpu_plane *pdpu,
627627
* select fill format to match user property expectation,
628628
* h/w only supports RGB variants
629629
*/
630-
fmt = priv->kms->funcs->get_format(priv->kms, DRM_FORMAT_ABGR8888, 0);
630+
fmt = mdp_get_format(priv->kms, DRM_FORMAT_ABGR8888, 0);
631631
/* should not happen ever */
632632
if (!fmt)
633633
return;

drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ static const struct mdp_kms_funcs kms_funcs = {
151151
.flush_commit = mdp4_flush_commit,
152152
.wait_flush = mdp4_wait_flush,
153153
.complete_commit = mdp4_complete_commit,
154-
.get_format = mdp_get_format,
155154
.round_pixclk = mdp4_round_pixclk,
156155
.destroy = mdp4_destroy,
157156
},

drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ static const struct mdp_kms_funcs kms_funcs = {
224224
.prepare_commit = mdp5_prepare_commit,
225225
.wait_flush = mdp5_wait_flush,
226226
.complete_commit = mdp5_complete_commit,
227-
.get_format = mdp_get_format,
228227
.destroy = mdp5_kms_destroy,
229228
},
230229
.set_irqmask = mdp5_set_irqmask,

drivers/gpu/drm/msm/msm_fb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ static struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev,
181181
&mode_cmd->pixel_format);
182182

183183
n = info->num_planes;
184-
format = kms->funcs->get_format(kms, mode_cmd->pixel_format,
184+
format = mdp_get_format(kms, mode_cmd->pixel_format,
185185
mode_cmd->modifier[0]);
186186
if (!format) {
187187
DRM_DEV_ERROR(dev->dev, "unsupported pixel format: %p4cc\n",

drivers/gpu/drm/msm/msm_kms.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ struct msm_kms_funcs {
9292
* Format handling:
9393
*/
9494

95-
/* get msm_format w/ optional format modifiers from drm_mode_fb_cmd2 */
96-
const struct msm_format *(*get_format)(struct msm_kms *kms,
97-
const uint32_t format,
98-
const uint64_t modifiers);
9995
/* do format checking on format modified through fb_cmd2 modifiers */
10096
int (*check_modified_format)(const struct msm_kms *kms,
10197
const struct msm_format *msm_fmt,

0 commit comments

Comments
 (0)