Skip to content

Commit 3115208

Browse files
committed
Merge tag 'drm-msm-fixes-2024-02-07' of https://gitlab.freedesktop.org/drm/msm into drm-fixes
Fixes for v6.8-rc4 DPU: - fix for kernel doc warnings and smatch warnings in dpu_encoder - fix for smatch warning in dpu_encoder - fix the bus bandwidth value for SDM670 DP: - fixes to handle unknown bpc case correctly for DP. The current code was spilling over into other bits of DP configuration register, had to be fixed to avoid the extra shifts which were causing the spill over - fix for MISC0 programming in DP driver to program the correct colorimetry value GPU: - dmabuf vmap fix - a610 UBWC corruption fix (incorrect hbb) - revert a commit that was making GPU recovery unreliable Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGv+tb1+_cp7ftxcMZbbxE9810rvxeaC50eL=msQ+zkm0g@mail.gmail.com
2 parents b30bed9 + 8d35217 commit 3115208

File tree

6 files changed

+22
-20
lines changed

6 files changed

+22
-20
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,6 @@ enum dpu_enc_rc_states {
144144
* to track crtc in the disable() hook which is called
145145
* _after_ encoder_mask is cleared.
146146
* @connector: If a mode is set, cached pointer to the active connector
147-
* @crtc_kickoff_cb: Callback into CRTC that will flush & start
148-
* all CTL paths
149-
* @crtc_kickoff_cb_data: Opaque user data given to crtc_kickoff_cb
150-
* @debugfs_root: Debug file system root file node
151147
* @enc_lock: Lock around physical encoder
152148
* create/destroy/enable/disable
153149
* @frame_busy_mask: Bitmask tracking which phys_enc we are still
@@ -2072,7 +2068,7 @@ void dpu_encoder_helper_phys_cleanup(struct dpu_encoder_phys *phys_enc)
20722068
}
20732069

20742070
/* reset the merge 3D HW block */
2075-
if (phys_enc->hw_pp->merge_3d) {
2071+
if (phys_enc->hw_pp && phys_enc->hw_pp->merge_3d) {
20762072
phys_enc->hw_pp->merge_3d->ops.setup_3d_mode(phys_enc->hw_pp->merge_3d,
20772073
BLEND_3D_NONE);
20782074
if (phys_enc->hw_ctl->ops.update_pending_flush_merge_3d)
@@ -2103,7 +2099,7 @@ void dpu_encoder_helper_phys_cleanup(struct dpu_encoder_phys *phys_enc)
21032099
if (phys_enc->hw_wb)
21042100
intf_cfg.wb = phys_enc->hw_wb->idx;
21052101

2106-
if (phys_enc->hw_pp->merge_3d)
2102+
if (phys_enc->hw_pp && phys_enc->hw_pp->merge_3d)
21072103
intf_cfg.merge_3d = phys_enc->hw_pp->merge_3d->idx;
21082104

21092105
if (ctl->ops.reset_intf_cfg)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ static inline bool reserved_by_other(uint32_t *res_map, int idx,
2929
/**
3030
* struct dpu_rm_requirements - Reservation requirements parameter bundle
3131
* @topology: selected topology for the display
32-
* @hw_res: Hardware resources required as reported by the encoders
3332
*/
3433
struct dpu_rm_requirements {
3534
struct msm_display_topology topology;
@@ -204,6 +203,8 @@ static bool _dpu_rm_needs_split_display(const struct msm_display_topology *top)
204203
* _dpu_rm_get_lm_peer - get the id of a mixer which is a peer of the primary
205204
* @rm: dpu resource manager handle
206205
* @primary_idx: index of primary mixer in rm->mixer_blks[]
206+
*
207+
* Returns: lm peer mixed id on success or %-EINVAL on error
207208
*/
208209
static int _dpu_rm_get_lm_peer(struct dpu_rm *rm, int primary_idx)
209210
{

drivers/gpu/drm/msm/dp/dp_ctrl.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,6 @@ static void dp_ctrl_config_ctrl(struct dp_ctrl_private *ctrl)
135135
tbd = dp_link_get_test_bits_depth(ctrl->link,
136136
ctrl->panel->dp_mode.bpp);
137137

138-
if (tbd == DP_TEST_BIT_DEPTH_UNKNOWN) {
139-
pr_debug("BIT_DEPTH not set. Configure default\n");
140-
tbd = DP_TEST_BIT_DEPTH_8;
141-
}
142-
143138
config |= tbd << DP_CONFIGURATION_CTRL_BPC_SHIFT;
144139

145140
/* Num of Lanes */

drivers/gpu/drm/msm/dp/dp_link.c

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include <drm/drm_print.h>
99

10+
#include "dp_reg.h"
1011
#include "dp_link.h"
1112
#include "dp_panel.h"
1213

@@ -1082,7 +1083,7 @@ int dp_link_process_request(struct dp_link *dp_link)
10821083

10831084
int dp_link_get_colorimetry_config(struct dp_link *dp_link)
10841085
{
1085-
u32 cc;
1086+
u32 cc = DP_MISC0_COLORIMERY_CFG_LEGACY_RGB;
10861087
struct dp_link_private *link;
10871088

10881089
if (!dp_link) {
@@ -1096,10 +1097,11 @@ int dp_link_get_colorimetry_config(struct dp_link *dp_link)
10961097
* Unless a video pattern CTS test is ongoing, use RGB_VESA
10971098
* Only RGB_VESA and RGB_CEA supported for now
10981099
*/
1099-
if (dp_link_is_video_pattern_requested(link))
1100-
cc = link->dp_link.test_video.test_dyn_range;
1101-
else
1102-
cc = DP_TEST_DYNAMIC_RANGE_VESA;
1100+
if (dp_link_is_video_pattern_requested(link)) {
1101+
if (link->dp_link.test_video.test_dyn_range &
1102+
DP_TEST_DYNAMIC_RANGE_CEA)
1103+
cc = DP_MISC0_COLORIMERY_CFG_CEA_RGB;
1104+
}
11031105

11041106
return cc;
11051107
}
@@ -1179,6 +1181,9 @@ void dp_link_reset_phy_params_vx_px(struct dp_link *dp_link)
11791181
u32 dp_link_get_test_bits_depth(struct dp_link *dp_link, u32 bpp)
11801182
{
11811183
u32 tbd;
1184+
struct dp_link_private *link;
1185+
1186+
link = container_of(dp_link, struct dp_link_private, dp_link);
11821187

11831188
/*
11841189
* Few simplistic rules and assumptions made here:
@@ -1196,12 +1201,13 @@ u32 dp_link_get_test_bits_depth(struct dp_link *dp_link, u32 bpp)
11961201
tbd = DP_TEST_BIT_DEPTH_10;
11971202
break;
11981203
default:
1199-
tbd = DP_TEST_BIT_DEPTH_UNKNOWN;
1204+
drm_dbg_dp(link->drm_dev, "bpp=%d not supported, use bpc=8\n",
1205+
bpp);
1206+
tbd = DP_TEST_BIT_DEPTH_8;
12001207
break;
12011208
}
12021209

1203-
if (tbd != DP_TEST_BIT_DEPTH_UNKNOWN)
1204-
tbd = (tbd >> DP_TEST_BIT_DEPTH_SHIFT);
1210+
tbd = (tbd >> DP_TEST_BIT_DEPTH_SHIFT);
12051211

12061212
return tbd;
12071213
}

drivers/gpu/drm/msm/dp/dp_reg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@
143143
#define DP_MISC0_COLORIMETRY_CFG_SHIFT (0x00000001)
144144
#define DP_MISC0_TEST_BITS_DEPTH_SHIFT (0x00000005)
145145

146+
#define DP_MISC0_COLORIMERY_CFG_LEGACY_RGB (0)
147+
#define DP_MISC0_COLORIMERY_CFG_CEA_RGB (0x04)
148+
146149
#define REG_DP_VALID_BOUNDARY (0x00000030)
147150
#define REG_DP_VALID_BOUNDARY_2 (0x00000034)
148151

drivers/gpu/drm/msm/msm_mdss.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ static const struct msm_mdss_data sdm670_data = {
562562
.ubwc_enc_version = UBWC_2_0,
563563
.ubwc_dec_version = UBWC_2_0,
564564
.highest_bank_bit = 1,
565+
.reg_bus_bw = 76800,
565566
};
566567

567568
static const struct msm_mdss_data sdm845_data = {

0 commit comments

Comments
 (0)