Skip to content

Commit b228501

Browse files
committed
drm/msm: merge dpu format database to MDP formats
Finally remove duplication between DPU and generic MDP code by merging DPU format lists to the MDP format database. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/590435/ Link: https://lore.kernel.org/r/[email protected]
1 parent f4f3920 commit b228501

File tree

11 files changed

+571
-708
lines changed

11 files changed

+571
-708
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 = dpu_get_dpu_format(fmt_fourcc);
277+
fmt = phys_enc->dpu_kms->base.funcs->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 = dpu_get_dpu_format(fmt_fourcc);
417+
fmt = phys_enc->dpu_kms->base.funcs->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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ 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 = dpu_get_dpu_format_ext(format->pixel_format, wb_job->fb->modifier);
329+
dpu_fmt = phys_enc->dpu_kms->base.funcs->get_format(&phys_enc->dpu_kms->base,
330+
format->pixel_format, wb_job->fb->modifier);
330331

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

577578
format = msm_framebuffer_format(job->fb);
578579

579-
wb_cfg->dest.format = dpu_get_dpu_format_ext(
580-
format->pixel_format, job->fb->modifier);
580+
wb_cfg->dest.format = phys_enc->dpu_kms->base.funcs->get_format(&phys_enc->dpu_kms->base,
581+
format->pixel_format, job->fb->modifier);
581582
if (!wb_cfg->dest.format) {
582583
/* this error should be detected during atomic_check */
583584
DPU_ERROR("failed to get format %p4cc\n", &format->pixel_format);

0 commit comments

Comments
 (0)