Skip to content

Commit 71c5c23

Browse files
Abhinav Kumarrobclark
authored andcommitted
drm/msm/dpu: check ubwc support before adding compressed formats
On QCM2290 chipset DPU does not support UBWC. Add a dpu cap to indicate this and do not expose compressed formats in this case. changes since RFC: - use ubwc enc and dec version of mdss_data instead of catalog to decide if ubwc is supported Signed-off-by: Abhinav Kumar <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/601392/ Signed-off-by: Rob Clark <[email protected]>
1 parent 2c4c53f commit 71c5c23

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <drm/drm_gem_atomic_helper.h>
1919

2020
#include "msm_drv.h"
21+
#include "msm_mdss.h"
2122
#include "dpu_kms.h"
2223
#include "dpu_formats.h"
2324
#include "dpu_hw_sspp.h"
@@ -1342,10 +1343,14 @@ void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable)
13421343
static bool dpu_plane_format_mod_supported(struct drm_plane *plane,
13431344
uint32_t format, uint64_t modifier)
13441345
{
1346+
struct dpu_kms *dpu_kms = _dpu_plane_get_kms(plane);
1347+
bool has_no_ubwc = (dpu_kms->mdss->ubwc_enc_version == 0) &&
1348+
(dpu_kms->mdss->ubwc_dec_version == 0);
1349+
13451350
if (modifier == DRM_FORMAT_MOD_LINEAR)
13461351
return true;
13471352

1348-
if (modifier == DRM_FORMAT_MOD_QCOM_COMPRESSED)
1353+
if (modifier == DRM_FORMAT_MOD_QCOM_COMPRESSED && !has_no_ubwc)
13491354
return dpu_find_format(format, qcom_compressed_supported_formats,
13501355
ARRAY_SIZE(qcom_compressed_supported_formats));
13511356

0 commit comments

Comments
 (0)