Skip to content

Commit a269919

Browse files
committed
drm/msm/dpu: drop dpu_format_check_modified_format
The msm_kms_funcs::check_modified_format() callback is not used by the driver. Drop it completely. Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Tested-by: Abhinav Kumar <quic_abhinavk@quicinc.com> # sc7280 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/612239/ Link: https://lore.kernel.org/r/20240903-dpu-mode-config-width-v6-4-617e1ecc4b7a@linaro.org
1 parent b139c80 commit a269919

4 files changed

Lines changed: 0 additions & 66 deletions

File tree

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

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -423,46 +423,3 @@ int dpu_format_populate_layout(
423423

424424
return ret;
425425
}
426-
427-
int dpu_format_check_modified_format(
428-
const struct msm_kms *kms,
429-
const struct msm_format *fmt,
430-
const struct drm_mode_fb_cmd2 *cmd,
431-
struct drm_gem_object **bos)
432-
{
433-
const struct drm_format_info *info;
434-
struct dpu_hw_fmt_layout layout;
435-
uint32_t bos_total_size = 0;
436-
int ret, i;
437-
438-
if (!fmt || !cmd || !bos) {
439-
DRM_ERROR("invalid arguments\n");
440-
return -EINVAL;
441-
}
442-
443-
info = drm_format_info(fmt->pixel_format);
444-
if (!info)
445-
return -EINVAL;
446-
447-
ret = dpu_format_get_plane_sizes(fmt, cmd->width, cmd->height,
448-
&layout, cmd->pitches);
449-
if (ret)
450-
return ret;
451-
452-
for (i = 0; i < info->num_planes; i++) {
453-
if (!bos[i]) {
454-
DRM_ERROR("invalid handle for plane %d\n", i);
455-
return -EINVAL;
456-
}
457-
if ((i == 0) || (bos[i] != bos[0]))
458-
bos_total_size += bos[i]->size;
459-
}
460-
461-
if (bos_total_size < layout.total_size) {
462-
DRM_ERROR("buffers total size too small %u expected %u\n",
463-
bos_total_size, layout.total_size);
464-
return -EINVAL;
465-
}
466-
467-
return 0;
468-
}

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,6 @@ static inline bool dpu_find_format(u32 format, const u32 *supported_formats,
3131
return false;
3232
}
3333

34-
/**
35-
* dpu_format_check_modified_format - validate format and buffers for
36-
* dpu non-standard, i.e. modified format
37-
* @kms: kms driver
38-
* @msm_fmt: pointer to the msm_fmt base pointer of an msm_format
39-
* @cmd: fb_cmd2 structure user request
40-
* @bos: gem buffer object list
41-
*
42-
* Return: error code on failure, 0 on success
43-
*/
44-
int dpu_format_check_modified_format(
45-
const struct msm_kms *kms,
46-
const struct msm_format *msm_fmt,
47-
const struct drm_mode_fb_cmd2 *cmd,
48-
struct drm_gem_object **bos);
49-
5034
/**
5135
* dpu_format_populate_layout - populate the given format layout based on
5236
* mmu, fb, and format found in the fb

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,6 @@ static const struct msm_kms_funcs kms_funcs = {
10251025
.complete_commit = dpu_kms_complete_commit,
10261026
.enable_vblank = dpu_kms_enable_vblank,
10271027
.disable_vblank = dpu_kms_disable_vblank,
1028-
.check_modified_format = dpu_format_check_modified_format,
10291028
.destroy = dpu_kms_destroy,
10301029
.snapshot = dpu_kms_mdp_snapshot,
10311030
#ifdef CONFIG_DEBUG_FS

drivers/gpu/drm/msm/msm_kms.h

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

95-
/* do format checking on format modified through fb_cmd2 modifiers */
96-
int (*check_modified_format)(const struct msm_kms *kms,
97-
const struct msm_format *msm_fmt,
98-
const struct drm_mode_fb_cmd2 *cmd,
99-
struct drm_gem_object **bos);
100-
10195
/* misc: */
10296
long (*round_pixclk)(struct msm_kms *kms, unsigned long rate,
10397
struct drm_encoder *encoder);

0 commit comments

Comments
 (0)