Commit 31152088 authored by Dave Airlie's avatar Dave Airlie

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: default avatarDave 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
parents b30bed9d 8d352171
...@@ -144,10 +144,6 @@ enum dpu_enc_rc_states { ...@@ -144,10 +144,6 @@ enum dpu_enc_rc_states {
* to track crtc in the disable() hook which is called * to track crtc in the disable() hook which is called
* _after_ encoder_mask is cleared. * _after_ encoder_mask is cleared.
* @connector: If a mode is set, cached pointer to the active connector * @connector: If a mode is set, cached pointer to the active connector
* @crtc_kickoff_cb: Callback into CRTC that will flush & start
* all CTL paths
* @crtc_kickoff_cb_data: Opaque user data given to crtc_kickoff_cb
* @debugfs_root: Debug file system root file node
* @enc_lock: Lock around physical encoder * @enc_lock: Lock around physical encoder
* create/destroy/enable/disable * create/destroy/enable/disable
* @frame_busy_mask: Bitmask tracking which phys_enc we are still * @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) ...@@ -2072,7 +2068,7 @@ void dpu_encoder_helper_phys_cleanup(struct dpu_encoder_phys *phys_enc)
} }
/* reset the merge 3D HW block */ /* reset the merge 3D HW block */
if (phys_enc->hw_pp->merge_3d) { if (phys_enc->hw_pp && phys_enc->hw_pp->merge_3d) {
phys_enc->hw_pp->merge_3d->ops.setup_3d_mode(phys_enc->hw_pp->merge_3d, phys_enc->hw_pp->merge_3d->ops.setup_3d_mode(phys_enc->hw_pp->merge_3d,
BLEND_3D_NONE); BLEND_3D_NONE);
if (phys_enc->hw_ctl->ops.update_pending_flush_merge_3d) 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) ...@@ -2103,7 +2099,7 @@ void dpu_encoder_helper_phys_cleanup(struct dpu_encoder_phys *phys_enc)
if (phys_enc->hw_wb) if (phys_enc->hw_wb)
intf_cfg.wb = phys_enc->hw_wb->idx; intf_cfg.wb = phys_enc->hw_wb->idx;
if (phys_enc->hw_pp->merge_3d) if (phys_enc->hw_pp && phys_enc->hw_pp->merge_3d)
intf_cfg.merge_3d = phys_enc->hw_pp->merge_3d->idx; intf_cfg.merge_3d = phys_enc->hw_pp->merge_3d->idx;
if (ctl->ops.reset_intf_cfg) if (ctl->ops.reset_intf_cfg)
......
...@@ -29,7 +29,6 @@ static inline bool reserved_by_other(uint32_t *res_map, int idx, ...@@ -29,7 +29,6 @@ static inline bool reserved_by_other(uint32_t *res_map, int idx,
/** /**
* struct dpu_rm_requirements - Reservation requirements parameter bundle * struct dpu_rm_requirements - Reservation requirements parameter bundle
* @topology: selected topology for the display * @topology: selected topology for the display
* @hw_res: Hardware resources required as reported by the encoders
*/ */
struct dpu_rm_requirements { struct dpu_rm_requirements {
struct msm_display_topology topology; struct msm_display_topology topology;
...@@ -204,6 +203,8 @@ static bool _dpu_rm_needs_split_display(const struct msm_display_topology *top) ...@@ -204,6 +203,8 @@ static bool _dpu_rm_needs_split_display(const struct msm_display_topology *top)
* _dpu_rm_get_lm_peer - get the id of a mixer which is a peer of the primary * _dpu_rm_get_lm_peer - get the id of a mixer which is a peer of the primary
* @rm: dpu resource manager handle * @rm: dpu resource manager handle
* @primary_idx: index of primary mixer in rm->mixer_blks[] * @primary_idx: index of primary mixer in rm->mixer_blks[]
*
* Returns: lm peer mixed id on success or %-EINVAL on error
*/ */
static int _dpu_rm_get_lm_peer(struct dpu_rm *rm, int primary_idx) static int _dpu_rm_get_lm_peer(struct dpu_rm *rm, int primary_idx)
{ {
......
...@@ -135,11 +135,6 @@ static void dp_ctrl_config_ctrl(struct dp_ctrl_private *ctrl) ...@@ -135,11 +135,6 @@ static void dp_ctrl_config_ctrl(struct dp_ctrl_private *ctrl)
tbd = dp_link_get_test_bits_depth(ctrl->link, tbd = dp_link_get_test_bits_depth(ctrl->link,
ctrl->panel->dp_mode.bpp); ctrl->panel->dp_mode.bpp);
if (tbd == DP_TEST_BIT_DEPTH_UNKNOWN) {
pr_debug("BIT_DEPTH not set. Configure default\n");
tbd = DP_TEST_BIT_DEPTH_8;
}
config |= tbd << DP_CONFIGURATION_CTRL_BPC_SHIFT; config |= tbd << DP_CONFIGURATION_CTRL_BPC_SHIFT;
/* Num of Lanes */ /* Num of Lanes */
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <drm/drm_print.h> #include <drm/drm_print.h>
#include "dp_reg.h"
#include "dp_link.h" #include "dp_link.h"
#include "dp_panel.h" #include "dp_panel.h"
...@@ -1082,7 +1083,7 @@ int dp_link_process_request(struct dp_link *dp_link) ...@@ -1082,7 +1083,7 @@ int dp_link_process_request(struct dp_link *dp_link)
int dp_link_get_colorimetry_config(struct dp_link *dp_link) int dp_link_get_colorimetry_config(struct dp_link *dp_link)
{ {
u32 cc; u32 cc = DP_MISC0_COLORIMERY_CFG_LEGACY_RGB;
struct dp_link_private *link; struct dp_link_private *link;
if (!dp_link) { if (!dp_link) {
...@@ -1096,10 +1097,11 @@ int dp_link_get_colorimetry_config(struct dp_link *dp_link) ...@@ -1096,10 +1097,11 @@ int dp_link_get_colorimetry_config(struct dp_link *dp_link)
* Unless a video pattern CTS test is ongoing, use RGB_VESA * Unless a video pattern CTS test is ongoing, use RGB_VESA
* Only RGB_VESA and RGB_CEA supported for now * Only RGB_VESA and RGB_CEA supported for now
*/ */
if (dp_link_is_video_pattern_requested(link)) if (dp_link_is_video_pattern_requested(link)) {
cc = link->dp_link.test_video.test_dyn_range; if (link->dp_link.test_video.test_dyn_range &
else DP_TEST_DYNAMIC_RANGE_CEA)
cc = DP_TEST_DYNAMIC_RANGE_VESA; cc = DP_MISC0_COLORIMERY_CFG_CEA_RGB;
}
return cc; return cc;
} }
...@@ -1179,6 +1181,9 @@ void dp_link_reset_phy_params_vx_px(struct dp_link *dp_link) ...@@ -1179,6 +1181,9 @@ void dp_link_reset_phy_params_vx_px(struct dp_link *dp_link)
u32 dp_link_get_test_bits_depth(struct dp_link *dp_link, u32 bpp) u32 dp_link_get_test_bits_depth(struct dp_link *dp_link, u32 bpp)
{ {
u32 tbd; u32 tbd;
struct dp_link_private *link;
link = container_of(dp_link, struct dp_link_private, dp_link);
/* /*
* Few simplistic rules and assumptions made here: * 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) ...@@ -1196,12 +1201,13 @@ u32 dp_link_get_test_bits_depth(struct dp_link *dp_link, u32 bpp)
tbd = DP_TEST_BIT_DEPTH_10; tbd = DP_TEST_BIT_DEPTH_10;
break; break;
default: default:
tbd = DP_TEST_BIT_DEPTH_UNKNOWN; drm_dbg_dp(link->drm_dev, "bpp=%d not supported, use bpc=8\n",
bpp);
tbd = DP_TEST_BIT_DEPTH_8;
break; break;
} }
if (tbd != DP_TEST_BIT_DEPTH_UNKNOWN) tbd = (tbd >> DP_TEST_BIT_DEPTH_SHIFT);
tbd = (tbd >> DP_TEST_BIT_DEPTH_SHIFT);
return tbd; return tbd;
} }
......
...@@ -143,6 +143,9 @@ ...@@ -143,6 +143,9 @@
#define DP_MISC0_COLORIMETRY_CFG_SHIFT (0x00000001) #define DP_MISC0_COLORIMETRY_CFG_SHIFT (0x00000001)
#define DP_MISC0_TEST_BITS_DEPTH_SHIFT (0x00000005) #define DP_MISC0_TEST_BITS_DEPTH_SHIFT (0x00000005)
#define DP_MISC0_COLORIMERY_CFG_LEGACY_RGB (0)
#define DP_MISC0_COLORIMERY_CFG_CEA_RGB (0x04)
#define REG_DP_VALID_BOUNDARY (0x00000030) #define REG_DP_VALID_BOUNDARY (0x00000030)
#define REG_DP_VALID_BOUNDARY_2 (0x00000034) #define REG_DP_VALID_BOUNDARY_2 (0x00000034)
......
...@@ -562,6 +562,7 @@ static const struct msm_mdss_data sdm670_data = { ...@@ -562,6 +562,7 @@ static const struct msm_mdss_data sdm670_data = {
.ubwc_enc_version = UBWC_2_0, .ubwc_enc_version = UBWC_2_0,
.ubwc_dec_version = UBWC_2_0, .ubwc_dec_version = UBWC_2_0,
.highest_bank_bit = 1, .highest_bank_bit = 1,
.reg_bus_bw = 76800,
}; };
static const struct msm_mdss_data sdm845_data = { static const struct msm_mdss_data sdm845_data = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment