5.19 fixes for msm-next
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJihZ6hAAoJEJMTUIYYBUIphx8IAJZ+8FJ+qjCne0GaVFGczjFr cz1PVE7CAXWlgA+1V/xSw7Awt0oPhrB400SRh/2bea8awHkKZxtcnBIA1apEoDjo +qyhHMpwcItCHQM5xOKKGZb0KU+MCK9/6PH5VjD8k1gX52OoxQ4e0uUng7ljVgCe F/LBBpW6oY6ZAiZxaxieXSD36bNkwhYXdYGWdJFQPQF+N4gYPmSWOmijaRnkJtnv o4VS5HnTN3FMgKu+h2Rr7r4A5s7WygVJM7K+sbJZI/F+OCFv3lftkU2JOXGtS2oc 5sInJB972aafkD3lOzTPyARiHrtvLpsSGPXok24b3suRN0pHRYtvAOdrI0m/sUg= =y6Lb -----END PGP SIGNATURE----- Merge tag 'msm-next-5.19-fixes' of https://gitlab.freedesktop.org/abhinavk/msm into drm-next 5.19 fixes for msm-next - Limiting WB modes to max sspp linewidth - Fixing the supported rotations to add 180 back for IGT - Fix to handle pm_runtime_get_sync() errors to avoid unclocked access in the bind() path for dpu driver - Fix the irq_free() without request issue which was a big-time hitter in the CI-runs. Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Dave Airlie <airlied@redhat.com> From: Abhinav Kumar <quic_abhinavk@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/b011d51d-d634-123e-bf5f-27219ee33151@quicinc.com
This commit is contained in:
commit
0353682358
@ -1914,6 +1914,7 @@ struct msm_gpu *a6xx_gpu_init(struct drm_device *dev)
|
||||
BUG_ON(!node);
|
||||
|
||||
ret = a6xx_gmu_init(a6xx_gpu, node);
|
||||
of_node_put(node);
|
||||
if (ret) {
|
||||
a6xx_destroy(&(a6xx_gpu->base.base));
|
||||
return ERR_PTR(ret);
|
||||
|
@ -1089,7 +1089,9 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
|
||||
|
||||
dpu_kms_parse_data_bus_icc_path(dpu_kms);
|
||||
|
||||
pm_runtime_get_sync(&dpu_kms->pdev->dev);
|
||||
rc = pm_runtime_resume_and_get(&dpu_kms->pdev->dev);
|
||||
if (rc < 0)
|
||||
goto error;
|
||||
|
||||
dpu_kms->core_rev = readl_relaxed(dpu_kms->mmio + 0x0);
|
||||
|
||||
|
@ -1577,7 +1577,7 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
|
||||
BIT(DRM_MODE_BLEND_PREMULTI) |
|
||||
BIT(DRM_MODE_BLEND_COVERAGE));
|
||||
|
||||
supported_rotations = DRM_MODE_REFLECT_MASK | DRM_MODE_ROTATE_0;
|
||||
supported_rotations = DRM_MODE_REFLECT_MASK | DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180;
|
||||
|
||||
if (pdpu->pipe_hw->cap->features & BIT(DPU_SSPP_INLINE_ROTATION))
|
||||
supported_rotations |= DRM_MODE_ROTATE_MASK;
|
||||
|
@ -8,8 +8,10 @@
|
||||
static int dpu_wb_conn_get_modes(struct drm_connector *connector)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms);
|
||||
|
||||
return drm_add_modes_noedid(connector, dev->mode_config.max_width,
|
||||
return drm_add_modes_noedid(connector, dpu_kms->catalog->caps->max_linewidth,
|
||||
dev->mode_config.max_height);
|
||||
}
|
||||
|
||||
|
@ -997,8 +997,10 @@ static int mdp5_crtc_cursor_set(struct drm_crtc *crtc,
|
||||
|
||||
ret = msm_gem_get_and_pin_iova(cursor_bo, kms->aspace,
|
||||
&mdp5_crtc->cursor.iova);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
drm_gem_object_put(cursor_bo);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pm_runtime_get_sync(&pdev->dev);
|
||||
|
||||
|
@ -34,6 +34,32 @@ static struct msm_dsi_manager msm_dsim_glb;
|
||||
#define IS_SYNC_NEEDED() (msm_dsim_glb.is_sync_needed)
|
||||
#define IS_MASTER_DSI_LINK(id) (msm_dsim_glb.master_dsi_link_id == id)
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static bool dsi_mgr_power_on_early(struct drm_bridge *bridge)
|
||||
{
|
||||
struct drm_bridge *next_bridge = drm_bridge_get_next_bridge(bridge);
|
||||
|
||||
/*
|
||||
* If the next bridge in the chain is the Parade ps8640 bridge chip
|
||||
* then don't power on early since it seems to violate the expectations
|
||||
* of the firmware that the bridge chip is running.
|
||||
*
|
||||
* NOTE: this is expected to be a temporary special case. It's expected
|
||||
* that we'll eventually have a framework that allows the next level
|
||||
* bridge to indicate whether it needs us to power on before it or
|
||||
* after it. When that framework is in place then we'll use it and
|
||||
* remove this special case.
|
||||
*/
|
||||
return !(next_bridge && next_bridge->of_node &&
|
||||
of_device_is_compatible(next_bridge->of_node, "parade,ps8640"));
|
||||
}
|
||||
#else
|
||||
static inline bool dsi_mgr_power_on_early(struct drm_bridge *bridge)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline struct msm_dsi *dsi_mgr_get_dsi(int id)
|
||||
{
|
||||
return msm_dsim_glb.dsi[id];
|
||||
@ -389,6 +415,9 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge)
|
||||
if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
|
||||
return;
|
||||
|
||||
if (!dsi_mgr_power_on_early(bridge))
|
||||
dsi_mgr_bridge_power_on(bridge);
|
||||
|
||||
/* Always call panel functions once, because even for dual panels,
|
||||
* there is only one drm_panel instance.
|
||||
*/
|
||||
@ -570,7 +599,8 @@ static void dsi_mgr_bridge_mode_set(struct drm_bridge *bridge,
|
||||
if (is_bonded_dsi && other_dsi)
|
||||
msm_dsi_host_set_display_mode(other_dsi->host, adjusted_mode);
|
||||
|
||||
dsi_mgr_bridge_power_on(bridge);
|
||||
if (dsi_mgr_power_on_early(bridge))
|
||||
dsi_mgr_bridge_power_on(bridge);
|
||||
}
|
||||
|
||||
static enum drm_mode_status dsi_mgr_bridge_mode_valid(struct drm_bridge *bridge,
|
||||
|
@ -113,6 +113,8 @@ static int msm_irq_postinstall(struct drm_device *dev)
|
||||
|
||||
static int msm_irq_install(struct drm_device *dev, unsigned int irq)
|
||||
{
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
struct msm_kms *kms = priv->kms;
|
||||
int ret;
|
||||
|
||||
if (irq == IRQ_NOTCONNECTED)
|
||||
@ -124,6 +126,8 @@ static int msm_irq_install(struct drm_device *dev, unsigned int irq)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
kms->irq_requested = true;
|
||||
|
||||
ret = msm_irq_postinstall(dev);
|
||||
if (ret) {
|
||||
free_irq(irq, dev);
|
||||
@ -139,7 +143,8 @@ static void msm_irq_uninstall(struct drm_device *dev)
|
||||
struct msm_kms *kms = priv->kms;
|
||||
|
||||
kms->funcs->irq_uninstall(kms);
|
||||
free_irq(kms->irq, dev);
|
||||
if (kms->irq_requested)
|
||||
free_irq(kms->irq, dev);
|
||||
}
|
||||
|
||||
struct msm_vblank_work {
|
||||
|
@ -118,7 +118,7 @@ uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb,
|
||||
struct msm_gem_address_space *aspace, int plane)
|
||||
{
|
||||
struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb);
|
||||
return msm_fb->iova[plane];
|
||||
return msm_fb->iova[plane] + fb->offsets[plane];
|
||||
}
|
||||
|
||||
struct drm_gem_object *msm_framebuffer_bo(struct drm_framebuffer *fb, int plane)
|
||||
|
@ -148,6 +148,7 @@ struct msm_kms {
|
||||
|
||||
/* irq number to be passed on to msm_irq_install */
|
||||
int irq;
|
||||
bool irq_requested;
|
||||
|
||||
/* mapper-id used to request GEM buffer mapped for scanout: */
|
||||
struct msm_gem_address_space *aspace;
|
||||
|
Loading…
x
Reference in New Issue
Block a user