Merge tag 'drm-msm-fixes-2021-05-09' of https://gitlab.freedesktop.org/drm/msm into drm-fixes
- dsi regression fix - dma-buf pinning fix - displayport fixes - llc fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGuqLZDAEJwUFKb6m+h3kyxgjDEKa3DPA1fHA69vxbXH=g@mail.gmail.com
This commit is contained in:
commit
5dce58de4b
@ -1153,10 +1153,6 @@ static void a6xx_llc_slices_init(struct platform_device *pdev,
|
||||
{
|
||||
struct device_node *phandle;
|
||||
|
||||
a6xx_gpu->llc_mmio = msm_ioremap(pdev, "cx_mem", "gpu_cx");
|
||||
if (IS_ERR(a6xx_gpu->llc_mmio))
|
||||
return;
|
||||
|
||||
/*
|
||||
* There is a different programming path for targets with an mmu500
|
||||
* attached, so detect if that is the case
|
||||
@ -1166,6 +1162,11 @@ static void a6xx_llc_slices_init(struct platform_device *pdev,
|
||||
of_device_is_compatible(phandle, "arm,mmu-500"));
|
||||
of_node_put(phandle);
|
||||
|
||||
if (a6xx_gpu->have_mmu500)
|
||||
a6xx_gpu->llc_mmio = NULL;
|
||||
else
|
||||
a6xx_gpu->llc_mmio = msm_ioremap(pdev, "cx_mem", "gpu_cx");
|
||||
|
||||
a6xx_gpu->llc_slice = llcc_slice_getd(LLCC_GPU);
|
||||
a6xx_gpu->htw_llc_slice = llcc_slice_getd(LLCC_GPUHTW);
|
||||
|
||||
|
@ -527,6 +527,7 @@ int dp_audio_hw_params(struct device *dev,
|
||||
dp_audio_setup_acr(audio);
|
||||
dp_audio_safe_to_exit_level(audio);
|
||||
dp_audio_enable(audio, true);
|
||||
dp_display_signal_audio_start(dp_display);
|
||||
dp_display->audio_enabled = true;
|
||||
|
||||
end:
|
||||
|
@ -178,6 +178,15 @@ static int dp_del_event(struct dp_display_private *dp_priv, u32 event)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dp_display_signal_audio_start(struct msm_dp *dp_display)
|
||||
{
|
||||
struct dp_display_private *dp;
|
||||
|
||||
dp = container_of(dp_display, struct dp_display_private, dp_display);
|
||||
|
||||
reinit_completion(&dp->audio_comp);
|
||||
}
|
||||
|
||||
void dp_display_signal_audio_complete(struct msm_dp *dp_display)
|
||||
{
|
||||
struct dp_display_private *dp;
|
||||
@ -586,10 +595,8 @@ static int dp_connect_pending_timeout(struct dp_display_private *dp, u32 data)
|
||||
mutex_lock(&dp->event_mutex);
|
||||
|
||||
state = dp->hpd_state;
|
||||
if (state == ST_CONNECT_PENDING) {
|
||||
dp_display_enable(dp, 0);
|
||||
if (state == ST_CONNECT_PENDING)
|
||||
dp->hpd_state = ST_CONNECTED;
|
||||
}
|
||||
|
||||
mutex_unlock(&dp->event_mutex);
|
||||
|
||||
@ -651,7 +658,6 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data)
|
||||
dp_add_event(dp, EV_DISCONNECT_PENDING_TIMEOUT, 0, DP_TIMEOUT_5_SECOND);
|
||||
|
||||
/* signal the disconnect event early to ensure proper teardown */
|
||||
reinit_completion(&dp->audio_comp);
|
||||
dp_display_handle_plugged_change(g_dp_display, false);
|
||||
|
||||
dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK |
|
||||
@ -669,10 +675,8 @@ static int dp_disconnect_pending_timeout(struct dp_display_private *dp, u32 data
|
||||
mutex_lock(&dp->event_mutex);
|
||||
|
||||
state = dp->hpd_state;
|
||||
if (state == ST_DISCONNECT_PENDING) {
|
||||
dp_display_disable(dp, 0);
|
||||
if (state == ST_DISCONNECT_PENDING)
|
||||
dp->hpd_state = ST_DISCONNECTED;
|
||||
}
|
||||
|
||||
mutex_unlock(&dp->event_mutex);
|
||||
|
||||
@ -898,7 +902,6 @@ static int dp_display_disable(struct dp_display_private *dp, u32 data)
|
||||
/* wait only if audio was enabled */
|
||||
if (dp_display->audio_enabled) {
|
||||
/* signal the disconnect event */
|
||||
reinit_completion(&dp->audio_comp);
|
||||
dp_display_handle_plugged_change(dp_display, false);
|
||||
if (!wait_for_completion_timeout(&dp->audio_comp,
|
||||
HZ * 5))
|
||||
@ -1272,7 +1275,12 @@ static int dp_pm_resume(struct device *dev)
|
||||
|
||||
status = dp_catalog_link_is_connected(dp->catalog);
|
||||
|
||||
if (status)
|
||||
/*
|
||||
* can not declared display is connected unless
|
||||
* HDMI cable is plugged in and sink_count of
|
||||
* dongle become 1
|
||||
*/
|
||||
if (status && dp->link->sink_count)
|
||||
dp->dp_display.is_connected = true;
|
||||
else
|
||||
dp->dp_display.is_connected = false;
|
||||
|
@ -34,6 +34,7 @@ int dp_display_get_modes(struct msm_dp *dp_display,
|
||||
int dp_display_request_irq(struct msm_dp *dp_display);
|
||||
bool dp_display_check_video_test(struct msm_dp *dp_display);
|
||||
int dp_display_get_test_bpp(struct msm_dp *dp_display);
|
||||
void dp_display_signal_audio_start(struct msm_dp *dp_display);
|
||||
void dp_display_signal_audio_complete(struct msm_dp *dp_display);
|
||||
|
||||
#endif /* _DP_DISPLAY_H_ */
|
||||
|
@ -843,7 +843,7 @@ int msm_dsi_phy_get_clk_provider(struct msm_dsi_phy *phy,
|
||||
if (pixel_clk_provider)
|
||||
*pixel_clk_provider = phy->provided_clocks->hws[DSI_PIXEL_PLL_CLK]->clk;
|
||||
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void msm_dsi_phy_pll_save_state(struct msm_dsi_phy *phy)
|
||||
|
@ -405,6 +405,10 @@ static int pll_28nm_register(struct dsi_pll_28nm *pll_28nm, struct clk_hw **prov
|
||||
if (!vco_name)
|
||||
return -ENOMEM;
|
||||
|
||||
parent_name = devm_kzalloc(dev, 32, GFP_KERNEL);
|
||||
if (!parent_name)
|
||||
return -ENOMEM;
|
||||
|
||||
clk_name = devm_kzalloc(dev, 32, GFP_KERNEL);
|
||||
if (!clk_name)
|
||||
return -ENOMEM;
|
||||
|
@ -42,7 +42,7 @@
|
||||
* - 1.7.0 - Add MSM_PARAM_SUSPENDS to access suspend count
|
||||
*/
|
||||
#define MSM_VERSION_MAJOR 1
|
||||
#define MSM_VERSION_MINOR 6
|
||||
#define MSM_VERSION_MINOR 7
|
||||
#define MSM_VERSION_PATCHLEVEL 0
|
||||
|
||||
static const struct drm_mode_config_funcs mode_config_funcs = {
|
||||
|
@ -190,13 +190,25 @@ struct page **msm_gem_get_pages(struct drm_gem_object *obj)
|
||||
}
|
||||
|
||||
p = get_pages(obj);
|
||||
|
||||
if (!IS_ERR(p)) {
|
||||
msm_obj->pin_count++;
|
||||
update_inactive(msm_obj);
|
||||
}
|
||||
|
||||
msm_gem_unlock(obj);
|
||||
return p;
|
||||
}
|
||||
|
||||
void msm_gem_put_pages(struct drm_gem_object *obj)
|
||||
{
|
||||
/* when we start tracking the pin count, then do something here */
|
||||
struct msm_gem_object *msm_obj = to_msm_bo(obj);
|
||||
|
||||
msm_gem_lock(obj);
|
||||
msm_obj->pin_count--;
|
||||
GEM_WARN_ON(msm_obj->pin_count < 0);
|
||||
update_inactive(msm_obj);
|
||||
msm_gem_unlock(obj);
|
||||
}
|
||||
|
||||
int msm_gem_mmap_obj(struct drm_gem_object *obj,
|
||||
@ -646,6 +658,8 @@ static void *get_vaddr(struct drm_gem_object *obj, unsigned madv)
|
||||
ret = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
update_inactive(msm_obj);
|
||||
}
|
||||
|
||||
return msm_obj->vaddr;
|
||||
|
@ -221,7 +221,7 @@ static inline bool is_active(struct msm_gem_object *msm_obj)
|
||||
/* imported/exported objects are not purgeable: */
|
||||
static inline bool is_unpurgeable(struct msm_gem_object *msm_obj)
|
||||
{
|
||||
return msm_obj->base.dma_buf && msm_obj->base.import_attach;
|
||||
return msm_obj->base.import_attach || msm_obj->pin_count;
|
||||
}
|
||||
|
||||
static inline bool is_purgeable(struct msm_gem_object *msm_obj)
|
||||
@ -271,7 +271,7 @@ static inline void mark_unpurgeable(struct msm_gem_object *msm_obj)
|
||||
|
||||
static inline bool is_unevictable(struct msm_gem_object *msm_obj)
|
||||
{
|
||||
return is_unpurgeable(msm_obj) || msm_obj->pin_count || msm_obj->vaddr;
|
||||
return is_unpurgeable(msm_obj) || msm_obj->vaddr;
|
||||
}
|
||||
|
||||
static inline void mark_evictable(struct msm_gem_object *msm_obj)
|
||||
|
Loading…
Reference in New Issue
Block a user