mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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
This commit is contained in:
commit
311520887d
@ -144,10 +144,6 @@ enum dpu_enc_rc_states {
|
||||
* to track crtc in the disable() hook which is called
|
||||
* _after_ encoder_mask is cleared.
|
||||
* @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
|
||||
* create/destroy/enable/disable
|
||||
* @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)
|
||||
}
|
||||
|
||||
/* 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,
|
||||
BLEND_3D_NONE);
|
||||
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)
|
||||
if (phys_enc->hw_wb)
|
||||
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;
|
||||
|
||||
if (ctl->ops.reset_intf_cfg)
|
||||
|
@ -29,7 +29,6 @@ static inline bool reserved_by_other(uint32_t *res_map, int idx,
|
||||
/**
|
||||
* struct dpu_rm_requirements - Reservation requirements parameter bundle
|
||||
* @topology: selected topology for the display
|
||||
* @hw_res: Hardware resources required as reported by the encoders
|
||||
*/
|
||||
struct dpu_rm_requirements {
|
||||
struct msm_display_topology topology;
|
||||
@ -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
|
||||
* @rm: dpu resource manager handle
|
||||
* @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)
|
||||
{
|
||||
|
@ -135,11 +135,6 @@ static void dp_ctrl_config_ctrl(struct dp_ctrl_private *ctrl)
|
||||
tbd = dp_link_get_test_bits_depth(ctrl->link,
|
||||
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;
|
||||
|
||||
/* Num of Lanes */
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <drm/drm_print.h>
|
||||
|
||||
#include "dp_reg.h"
|
||||
#include "dp_link.h"
|
||||
#include "dp_panel.h"
|
||||
|
||||
@ -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)
|
||||
{
|
||||
u32 cc;
|
||||
u32 cc = DP_MISC0_COLORIMERY_CFG_LEGACY_RGB;
|
||||
struct dp_link_private *link;
|
||||
|
||||
if (!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
|
||||
* Only RGB_VESA and RGB_CEA supported for now
|
||||
*/
|
||||
if (dp_link_is_video_pattern_requested(link))
|
||||
cc = link->dp_link.test_video.test_dyn_range;
|
||||
else
|
||||
cc = DP_TEST_DYNAMIC_RANGE_VESA;
|
||||
if (dp_link_is_video_pattern_requested(link)) {
|
||||
if (link->dp_link.test_video.test_dyn_range &
|
||||
DP_TEST_DYNAMIC_RANGE_CEA)
|
||||
cc = DP_MISC0_COLORIMERY_CFG_CEA_RGB;
|
||||
}
|
||||
|
||||
return cc;
|
||||
}
|
||||
@ -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 tbd;
|
||||
struct dp_link_private *link;
|
||||
|
||||
link = container_of(dp_link, struct dp_link_private, dp_link);
|
||||
|
||||
/*
|
||||
* 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)
|
||||
tbd = DP_TEST_BIT_DEPTH_10;
|
||||
break;
|
||||
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;
|
||||
}
|
||||
|
||||
if (tbd != DP_TEST_BIT_DEPTH_UNKNOWN)
|
||||
tbd = (tbd >> DP_TEST_BIT_DEPTH_SHIFT);
|
||||
tbd = (tbd >> DP_TEST_BIT_DEPTH_SHIFT);
|
||||
|
||||
return tbd;
|
||||
}
|
||||
|
@ -143,6 +143,9 @@
|
||||
#define DP_MISC0_COLORIMETRY_CFG_SHIFT (0x00000001)
|
||||
#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_2 (0x00000034)
|
||||
|
||||
|
@ -562,6 +562,7 @@ static const struct msm_mdss_data sdm670_data = {
|
||||
.ubwc_enc_version = UBWC_2_0,
|
||||
.ubwc_dec_version = UBWC_2_0,
|
||||
.highest_bank_bit = 1,
|
||||
.reg_bus_bw = 76800,
|
||||
};
|
||||
|
||||
static const struct msm_mdss_data sdm845_data = {
|
||||
|
Loading…
Reference in New Issue
Block a user