Skip to content

Commit ce35787

Browse files
committed
drm/msm/dpu: drop extra aspace checks in dpu_formats
The DPU driver isn't expected to be used without an IOMMU. Thus the aspace will be always present. Not to mention that mdp4/mdp5 drivers call msm_framebuffer_iova() without such checks, as the whole msm_framebuffer layer is expected to support both IOMMU and IOMMU-less configurations. Drop these useless if (aspace) checks. Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/612249/ Link: https://lore.kernel.org/r/20240903-dpu-mode-config-width-v6-6-617e1ecc4b7a@linaro.org
1 parent 759bcfe commit ce35787

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,7 @@ static int _dpu_format_populate_addrs_ubwc(
280280
return -EINVAL;
281281
}
282282

283-
if (aspace)
284-
base_addr = msm_framebuffer_iova(fb, aspace, 0);
283+
base_addr = msm_framebuffer_iova(fb, aspace, 0);
285284
if (!base_addr) {
286285
DRM_ERROR("failed to retrieve base addr\n");
287286
return -EFAULT;
@@ -376,9 +375,7 @@ static int _dpu_format_populate_addrs_linear(
376375

377376
/* Populate addresses for simple formats here */
378377
for (i = 0; i < layout->num_planes; ++i) {
379-
if (aspace)
380-
layout->plane_addr[i] =
381-
msm_framebuffer_iova(fb, aspace, i);
378+
layout->plane_addr[i] = msm_framebuffer_iova(fb, aspace, i);
382379
if (!layout->plane_addr[i]) {
383380
DRM_ERROR("failed to retrieve base addr\n");
384381
return -EFAULT;

0 commit comments

Comments
 (0)