Skip to content

Commit 1a5409f

Browse files
committed
Merge tag 'msm-next-5.19-fixes' of https://gitlab.freedesktop.org/abhinavk/msm into msm-fixes-staging
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: Rob Clark <robdclark@chromium.org>
2 parents 947a844 + 64b22a0 commit 1a5409f

5 files changed

Lines changed: 14 additions & 4 deletions

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,9 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
10891089

10901090
dpu_kms_parse_data_bus_icc_path(dpu_kms);
10911091

1092-
pm_runtime_get_sync(&dpu_kms->pdev->dev);
1092+
rc = pm_runtime_resume_and_get(&dpu_kms->pdev->dev);
1093+
if (rc < 0)
1094+
goto error;
10931095

10941096
dpu_kms->core_rev = readl_relaxed(dpu_kms->mmio + 0x0);
10951097

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,7 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
15771577
BIT(DRM_MODE_BLEND_PREMULTI) |
15781578
BIT(DRM_MODE_BLEND_COVERAGE));
15791579

1580-
supported_rotations = DRM_MODE_REFLECT_MASK | DRM_MODE_ROTATE_0;
1580+
supported_rotations = DRM_MODE_REFLECT_MASK | DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180;
15811581

15821582
if (pdpu->pipe_hw->cap->features & BIT(DPU_SSPP_INLINE_ROTATION))
15831583
supported_rotations |= DRM_MODE_ROTATE_MASK;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
static int dpu_wb_conn_get_modes(struct drm_connector *connector)
99
{
1010
struct drm_device *dev = connector->dev;
11+
struct msm_drm_private *priv = dev->dev_private;
12+
struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms);
1113

12-
return drm_add_modes_noedid(connector, dev->mode_config.max_width,
14+
return drm_add_modes_noedid(connector, dpu_kms->catalog->caps->max_linewidth,
1315
dev->mode_config.max_height);
1416
}
1517

drivers/gpu/drm/msm/msm_drv.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ static int msm_irq_postinstall(struct drm_device *dev)
113113

114114
static int msm_irq_install(struct drm_device *dev, unsigned int irq)
115115
{
116+
struct msm_drm_private *priv = dev->dev_private;
117+
struct msm_kms *kms = priv->kms;
116118
int ret;
117119

118120
if (irq == IRQ_NOTCONNECTED)
@@ -124,6 +126,8 @@ static int msm_irq_install(struct drm_device *dev, unsigned int irq)
124126
if (ret)
125127
return ret;
126128

129+
kms->irq_requested = true;
130+
127131
ret = msm_irq_postinstall(dev);
128132
if (ret) {
129133
free_irq(irq, dev);
@@ -139,7 +143,8 @@ static void msm_irq_uninstall(struct drm_device *dev)
139143
struct msm_kms *kms = priv->kms;
140144

141145
kms->funcs->irq_uninstall(kms);
142-
free_irq(kms->irq, dev);
146+
if (kms->irq_requested)
147+
free_irq(kms->irq, dev);
143148
}
144149

145150
struct msm_vblank_work {

drivers/gpu/drm/msm/msm_kms.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ struct msm_kms {
148148

149149
/* irq number to be passed on to msm_irq_install */
150150
int irq;
151+
bool irq_requested;
151152

152153
/* mapper-id used to request GEM buffer mapped for scanout: */
153154
struct msm_gem_address_space *aspace;

0 commit comments

Comments
 (0)