diff options
| author | Dave Airlie <airlied@redhat.com> | 2019-05-15 20:19:29 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2019-05-15 20:19:33 -0400 |
| commit | 8da0e1525b7f0d69c6cb44094963906282b32673 (patch) | |
| tree | afdcf9ae748c4785ed54884f2507c09fc4b5b961 | |
| parent | dc28d5742b2b535c6858344f798835729a9f2a46 (diff) | |
| parent | 2b117451277140b782f3e4e56a4296c0a165e7ae (diff) | |
Merge tag 'drm-misc-next-fixes-2019-05-15' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
- A couple new panfrost fixes
- Fix the low refresh rate register in adv7511
- A handful of msm fixes that fell out of 5.1 bringup on SDM845
- Fix spinlock initialization in pl111
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Sean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20190515201729.GA89093@art_vandelay
| -rw-r--r-- | drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/msm/msm_atomic.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/msm/msm_gem.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/msm/msm_gem.h | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/panfrost/panfrost_device.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/panfrost/panfrost_drv.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/pl111/pl111_display.c | 5 |
10 files changed, 19 insertions, 21 deletions
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index ec2ca71e1323..c532e9c9e491 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | |||
| @@ -748,11 +748,11 @@ static void adv7511_mode_set(struct adv7511 *adv7511, | |||
| 748 | vsync_polarity = 1; | 748 | vsync_polarity = 1; |
| 749 | } | 749 | } |
| 750 | 750 | ||
| 751 | if (mode->vrefresh <= 24000) | 751 | if (drm_mode_vrefresh(mode) <= 24) |
| 752 | low_refresh_rate = ADV7511_LOW_REFRESH_RATE_24HZ; | 752 | low_refresh_rate = ADV7511_LOW_REFRESH_RATE_24HZ; |
| 753 | else if (mode->vrefresh <= 25000) | 753 | else if (drm_mode_vrefresh(mode) <= 25) |
| 754 | low_refresh_rate = ADV7511_LOW_REFRESH_RATE_25HZ; | 754 | low_refresh_rate = ADV7511_LOW_REFRESH_RATE_25HZ; |
| 755 | else if (mode->vrefresh <= 30000) | 755 | else if (drm_mode_vrefresh(mode) <= 30) |
| 756 | low_refresh_rate = ADV7511_LOW_REFRESH_RATE_30HZ; | 756 | low_refresh_rate = ADV7511_LOW_REFRESH_RATE_30HZ; |
| 757 | else | 757 | else |
| 758 | low_refresh_rate = ADV7511_LOW_REFRESH_RATE_NONE; | 758 | low_refresh_rate = ADV7511_LOW_REFRESH_RATE_NONE; |
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index 9155dafae2a9..38e2cfa9cec7 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c | |||
| @@ -747,7 +747,7 @@ int a6xx_gmu_resume(struct a6xx_gpu *a6xx_gpu) | |||
| 747 | * will make sure that the refcounting is correct in case we need to | 747 | * will make sure that the refcounting is correct in case we need to |
| 748 | * bring down the GX after a GMU failure | 748 | * bring down the GX after a GMU failure |
| 749 | */ | 749 | */ |
| 750 | if (!IS_ERR(gmu->gxpd)) | 750 | if (!IS_ERR_OR_NULL(gmu->gxpd)) |
| 751 | pm_runtime_get(gmu->gxpd); | 751 | pm_runtime_get(gmu->gxpd); |
| 752 | 752 | ||
| 753 | out: | 753 | out: |
| @@ -863,7 +863,7 @@ int a6xx_gmu_stop(struct a6xx_gpu *a6xx_gpu) | |||
| 863 | * domain. Usually the GMU does this but only if the shutdown sequence | 863 | * domain. Usually the GMU does this but only if the shutdown sequence |
| 864 | * was successful | 864 | * was successful |
| 865 | */ | 865 | */ |
| 866 | if (!IS_ERR(gmu->gxpd)) | 866 | if (!IS_ERR_OR_NULL(gmu->gxpd)) |
| 867 | pm_runtime_put_sync(gmu->gxpd); | 867 | pm_runtime_put_sync(gmu->gxpd); |
| 868 | 868 | ||
| 869 | clk_bulk_disable_unprepare(gmu->nr_clocks, gmu->clocks); | 869 | clk_bulk_disable_unprepare(gmu->nr_clocks, gmu->clocks); |
| @@ -1234,7 +1234,7 @@ void a6xx_gmu_remove(struct a6xx_gpu *a6xx_gpu) | |||
| 1234 | 1234 | ||
| 1235 | pm_runtime_disable(gmu->dev); | 1235 | pm_runtime_disable(gmu->dev); |
| 1236 | 1236 | ||
| 1237 | if (!IS_ERR(gmu->gxpd)) { | 1237 | if (!IS_ERR_OR_NULL(gmu->gxpd)) { |
| 1238 | pm_runtime_disable(gmu->gxpd); | 1238 | pm_runtime_disable(gmu->gxpd); |
| 1239 | dev_pm_domain_detach(gmu->gxpd, false); | 1239 | dev_pm_domain_detach(gmu->gxpd, false); |
| 1240 | } | 1240 | } |
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c index 018df2c3b7ed..45a5bc6ede5d 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #include "dpu_hwio.h" | 15 | #include "dpu_hwio.h" |
| 16 | #include "dpu_hw_lm.h" | 16 | #include "dpu_hw_lm.h" |
| 17 | #include "dpu_hw_mdss.h" | 17 | #include "dpu_hw_mdss.h" |
| 18 | #include "dpu_kms.h" | ||
| 19 | 18 | ||
| 20 | #define LM_OP_MODE 0x00 | 19 | #define LM_OP_MODE 0x00 |
| 21 | #define LM_OUT_SIZE 0x04 | 20 | #define LM_OUT_SIZE 0x04 |
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index da1f727d7495..ce1a555e1f31 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | |||
| @@ -780,7 +780,6 @@ static int dpu_plane_prepare_fb(struct drm_plane *plane, | |||
| 780 | struct dpu_plane_state *pstate = to_dpu_plane_state(new_state); | 780 | struct dpu_plane_state *pstate = to_dpu_plane_state(new_state); |
| 781 | struct dpu_hw_fmt_layout layout; | 781 | struct dpu_hw_fmt_layout layout; |
| 782 | struct drm_gem_object *obj; | 782 | struct drm_gem_object *obj; |
| 783 | struct msm_gem_object *msm_obj; | ||
| 784 | struct dma_fence *fence; | 783 | struct dma_fence *fence; |
| 785 | struct dpu_kms *kms = _dpu_plane_get_kms(&pdpu->base); | 784 | struct dpu_kms *kms = _dpu_plane_get_kms(&pdpu->base); |
| 786 | int ret; | 785 | int ret; |
| @@ -799,8 +798,7 @@ static int dpu_plane_prepare_fb(struct drm_plane *plane, | |||
| 799 | * implicit fence and fb prepare by hand here. | 798 | * implicit fence and fb prepare by hand here. |
| 800 | */ | 799 | */ |
| 801 | obj = msm_framebuffer_bo(new_state->fb, 0); | 800 | obj = msm_framebuffer_bo(new_state->fb, 0); |
| 802 | msm_obj = to_msm_bo(obj); | 801 | fence = reservation_object_get_excl_rcu(obj->resv); |
| 803 | fence = reservation_object_get_excl_rcu(msm_obj->resv); | ||
| 804 | if (fence) | 802 | if (fence) |
| 805 | drm_atomic_set_fence_for_plane(new_state, fence); | 803 | drm_atomic_set_fence_for_plane(new_state, fence); |
| 806 | 804 | ||
diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c index f5b1256e32b6..131c23a267ee 100644 --- a/drivers/gpu/drm/msm/msm_atomic.c +++ b/drivers/gpu/drm/msm/msm_atomic.c | |||
| @@ -49,15 +49,13 @@ int msm_atomic_prepare_fb(struct drm_plane *plane, | |||
| 49 | struct msm_drm_private *priv = plane->dev->dev_private; | 49 | struct msm_drm_private *priv = plane->dev->dev_private; |
| 50 | struct msm_kms *kms = priv->kms; | 50 | struct msm_kms *kms = priv->kms; |
| 51 | struct drm_gem_object *obj; | 51 | struct drm_gem_object *obj; |
| 52 | struct msm_gem_object *msm_obj; | ||
| 53 | struct dma_fence *fence; | 52 | struct dma_fence *fence; |
| 54 | 53 | ||
| 55 | if (!new_state->fb) | 54 | if (!new_state->fb) |
| 56 | return 0; | 55 | return 0; |
| 57 | 56 | ||
| 58 | obj = msm_framebuffer_bo(new_state->fb, 0); | 57 | obj = msm_framebuffer_bo(new_state->fb, 0); |
| 59 | msm_obj = to_msm_bo(obj); | 58 | fence = reservation_object_get_excl_rcu(obj->resv); |
| 60 | fence = reservation_object_get_excl_rcu(msm_obj->resv); | ||
| 61 | 59 | ||
| 62 | drm_atomic_set_fence_for_plane(new_state, fence); | 60 | drm_atomic_set_fence_for_plane(new_state, fence); |
| 63 | 61 | ||
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 31d5a744d84f..35f55dd25994 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c | |||
| @@ -803,7 +803,8 @@ void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m) | |||
| 803 | seq_puts(m, " vmas:"); | 803 | seq_puts(m, " vmas:"); |
| 804 | 804 | ||
| 805 | list_for_each_entry(vma, &msm_obj->vmas, list) | 805 | list_for_each_entry(vma, &msm_obj->vmas, list) |
| 806 | seq_printf(m, " [%s: %08llx,%s,inuse=%d]", vma->aspace->name, | 806 | seq_printf(m, " [%s: %08llx,%s,inuse=%d]", |
| 807 | vma->aspace != NULL ? vma->aspace->name : NULL, | ||
| 807 | vma->iova, vma->mapped ? "mapped" : "unmapped", | 808 | vma->iova, vma->mapped ? "mapped" : "unmapped", |
| 808 | vma->inuse); | 809 | vma->inuse); |
| 809 | 810 | ||
diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h index c5ac781dffee..812d1b1369a5 100644 --- a/drivers/gpu/drm/msm/msm_gem.h +++ b/drivers/gpu/drm/msm/msm_gem.h | |||
| @@ -86,10 +86,6 @@ struct msm_gem_object { | |||
| 86 | 86 | ||
| 87 | struct llist_node freed; | 87 | struct llist_node freed; |
| 88 | 88 | ||
| 89 | /* normally (resv == &_resv) except for imported bo's */ | ||
| 90 | struct reservation_object *resv; | ||
| 91 | struct reservation_object _resv; | ||
| 92 | |||
| 93 | /* For physically contiguous buffers. Used when we don't have | 89 | /* For physically contiguous buffers. Used when we don't have |
| 94 | * an IOMMU. Also used for stolen/splashscreen buffer. | 90 | * an IOMMU. Also used for stolen/splashscreen buffer. |
| 95 | */ | 91 | */ |
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c index 970f669c6d29..3b2bced1b015 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.c +++ b/drivers/gpu/drm/panfrost/panfrost_device.c | |||
| @@ -165,6 +165,10 @@ err_out0: | |||
| 165 | 165 | ||
| 166 | void panfrost_device_fini(struct panfrost_device *pfdev) | 166 | void panfrost_device_fini(struct panfrost_device *pfdev) |
| 167 | { | 167 | { |
| 168 | panfrost_job_fini(pfdev); | ||
| 169 | panfrost_mmu_fini(pfdev); | ||
| 170 | panfrost_gpu_fini(pfdev); | ||
| 171 | panfrost_reset_fini(pfdev); | ||
| 168 | panfrost_regulator_fini(pfdev); | 172 | panfrost_regulator_fini(pfdev); |
| 169 | panfrost_clk_fini(pfdev); | 173 | panfrost_clk_fini(pfdev); |
| 170 | } | 174 | } |
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index 94b0819ad50b..d11e2281dde6 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c | |||
| @@ -219,7 +219,8 @@ static int panfrost_ioctl_submit(struct drm_device *dev, void *data, | |||
| 219 | fail_job: | 219 | fail_job: |
| 220 | panfrost_job_put(job); | 220 | panfrost_job_put(job); |
| 221 | fail_out_sync: | 221 | fail_out_sync: |
| 222 | drm_syncobj_put(sync_out); | 222 | if (sync_out) |
| 223 | drm_syncobj_put(sync_out); | ||
| 223 | 224 | ||
| 224 | return ret; | 225 | return ret; |
| 225 | } | 226 | } |
diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c index 0c5d391f0a8f..4501597f30ab 100644 --- a/drivers/gpu/drm/pl111/pl111_display.c +++ b/drivers/gpu/drm/pl111/pl111_display.c | |||
| @@ -531,14 +531,15 @@ pl111_init_clock_divider(struct drm_device *drm) | |||
| 531 | dev_err(drm->dev, "CLCD: unable to get clcdclk.\n"); | 531 | dev_err(drm->dev, "CLCD: unable to get clcdclk.\n"); |
| 532 | return PTR_ERR(parent); | 532 | return PTR_ERR(parent); |
| 533 | } | 533 | } |
| 534 | |||
| 535 | spin_lock_init(&priv->tim2_lock); | ||
| 536 | |||
| 534 | /* If the clock divider is broken, use the parent directly */ | 537 | /* If the clock divider is broken, use the parent directly */ |
| 535 | if (priv->variant->broken_clockdivider) { | 538 | if (priv->variant->broken_clockdivider) { |
| 536 | priv->clk = parent; | 539 | priv->clk = parent; |
| 537 | return 0; | 540 | return 0; |
| 538 | } | 541 | } |
| 539 | parent_name = __clk_get_name(parent); | 542 | parent_name = __clk_get_name(parent); |
| 540 | |||
| 541 | spin_lock_init(&priv->tim2_lock); | ||
| 542 | div->init = &init; | 543 | div->init = &init; |
| 543 | 544 | ||
| 544 | ret = devm_clk_hw_register(drm->dev, div); | 545 | ret = devm_clk_hw_register(drm->dev, div); |
