mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
drm-misc-fixes for v5.6-rc3:
- Fix dt binding for sunxi. - Allow only 1 rotation argument, and allow 0 rotation in video cmdline. - Small compiler warning fix for panfrost. - Fix when using performance counters in panfrost when using per fd address space. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEuXvWqAysSYEJGuVH/lWMcqZwE8MFAl5OWawACgkQ/lWMcqZw E8M3UxAAlUvBWQvrGz6bLD3NANF5nW5KjARPNFhwr7uyI67MExZoBh9WqJejhoQ6 4dMv9BwT81EXhcaxyNjdshwkHktsvPr/ouEdO256e0UC1hs7zWOEapL7xXlV7dwe pvEUUnG07Umh50Df39jcOla4YgnoqYRwW7E7SMadvDuo81UJ6+Daf8we+PO5w2zD IbZsOfPBMn5NhyzXgnynlp3Y8df521EDb71x3R4d4vAyOoRE2Axmd7xZuqqkt59P BDxj02glXIZsSt5OLTPFQdlv7rYXo/Y52wulBDIDup6N/wD+9jlSMFL+OOQby3rP Q5Ve6TkLrSdkZWFVNsMMubylEw+CtNYForZb9J9uo0M7+PsP3tApLP1CYbi5lvI0 yIff8986H5U8I3DaETugwyPTMdnWnnqRsQN57A8WYbQV5YLSx7bUqV0bgW6pucJP yC0e0h7367sgYvtENCIxvQ1sNUxiEz0QfppN1xW55JLsEerghomF8vzQNQJd1/Iy 4GnHdvsB6NrBH1Ebzu3Ibj5hj5Y15znJlfhgFHuUwY0aiAW5cf4a+wH7EQdTt7T9 ufBM9DFiySBE4xhffHo8JpEMOQVrabBfZzs8qg0RMT899DMPTpjW2OIoblDfuck0 7LYfV/xU9qJMSsBA9X4G3+F/cH7EFikdNENEwJ2hyv04unpc/Ww= =NWxB -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2020-02-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.6-rc3: - Fix dt binding for sunxi. - Allow only 1 rotation argument, and allow 0 rotation in video cmdline. - Small compiler warning fix for panfrost. - Fix when using performance counters in panfrost when using per fd address space. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/f5a6370d-9898-6c72-43e4-5bb56a99b6f2@linux.intel.com
This commit is contained in:
commit
c1368b347f
@ -43,9 +43,13 @@ properties:
|
||||
- enum:
|
||||
- allwinner,sun8i-h3-tcon-tv
|
||||
- allwinner,sun50i-a64-tcon-tv
|
||||
- allwinner,sun50i-h6-tcon-tv
|
||||
- const: allwinner,sun8i-a83t-tcon-tv
|
||||
|
||||
- items:
|
||||
- enum:
|
||||
- allwinner,sun50i-h6-tcon-tv
|
||||
- const: allwinner,sun8i-r40-tcon-tv
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
|
@ -297,7 +297,7 @@ static inline int tc_poll_timeout(struct tc_data *tc, unsigned int addr,
|
||||
|
||||
static int tc_aux_wait_busy(struct tc_data *tc)
|
||||
{
|
||||
return tc_poll_timeout(tc, DP0_AUXSTATUS, AUX_BUSY, 0, 1000, 100000);
|
||||
return tc_poll_timeout(tc, DP0_AUXSTATUS, AUX_BUSY, 0, 100, 100000);
|
||||
}
|
||||
|
||||
static int tc_aux_write_data(struct tc_data *tc, const void *data,
|
||||
@ -640,7 +640,7 @@ static int tc_aux_link_setup(struct tc_data *tc)
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
ret = tc_poll_timeout(tc, DP_PHY_CTRL, PHY_RDY, PHY_RDY, 1, 1000);
|
||||
ret = tc_poll_timeout(tc, DP_PHY_CTRL, PHY_RDY, PHY_RDY, 100, 100000);
|
||||
if (ret == -ETIMEDOUT) {
|
||||
dev_err(tc->dev, "Timeout waiting for PHY to become ready");
|
||||
return ret;
|
||||
@ -876,7 +876,7 @@ static int tc_wait_link_training(struct tc_data *tc)
|
||||
int ret;
|
||||
|
||||
ret = tc_poll_timeout(tc, DP0_LTSTAT, LT_LOOPDONE,
|
||||
LT_LOOPDONE, 1, 1000);
|
||||
LT_LOOPDONE, 500, 100000);
|
||||
if (ret) {
|
||||
dev_err(tc->dev, "Link training timeout waiting for LT_LOOPDONE!\n");
|
||||
return ret;
|
||||
@ -949,7 +949,7 @@ static int tc_main_link_enable(struct tc_data *tc)
|
||||
dp_phy_ctrl &= ~(DP_PHY_RST | PHY_M1_RST | PHY_M0_RST);
|
||||
ret = regmap_write(tc->regmap, DP_PHY_CTRL, dp_phy_ctrl);
|
||||
|
||||
ret = tc_poll_timeout(tc, DP_PHY_CTRL, PHY_RDY, PHY_RDY, 1, 1000);
|
||||
ret = tc_poll_timeout(tc, DP_PHY_CTRL, PHY_RDY, PHY_RDY, 500, 100000);
|
||||
if (ret) {
|
||||
dev_err(dev, "timeout waiting for phy become ready");
|
||||
return ret;
|
||||
|
@ -140,7 +140,8 @@ static int tfp410_attach(struct drm_bridge *bridge)
|
||||
dvi->connector_type,
|
||||
dvi->ddc);
|
||||
if (ret) {
|
||||
dev_err(dvi->dev, "drm_connector_init() failed: %d\n", ret);
|
||||
dev_err(dvi->dev, "drm_connector_init_with_ddc() failed: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -951,7 +951,8 @@ bool drm_client_rotation(struct drm_mode_set *modeset, unsigned int *rotation)
|
||||
* depending on the hardware this may require the framebuffer
|
||||
* to be in a specific tiling format.
|
||||
*/
|
||||
if ((*rotation & DRM_MODE_ROTATE_MASK) != DRM_MODE_ROTATE_180 ||
|
||||
if (((*rotation & DRM_MODE_ROTATE_MASK) != DRM_MODE_ROTATE_0 &&
|
||||
(*rotation & DRM_MODE_ROTATE_MASK) != DRM_MODE_ROTATE_180) ||
|
||||
!plane->rotation_property)
|
||||
return false;
|
||||
|
||||
|
@ -1698,6 +1698,13 @@ static int drm_mode_parse_cmdline_options(const char *str,
|
||||
if (rotation && freestanding)
|
||||
return -EINVAL;
|
||||
|
||||
if (!(rotation & DRM_MODE_ROTATE_MASK))
|
||||
rotation |= DRM_MODE_ROTATE_0;
|
||||
|
||||
/* Make sure there is exactly one rotation defined */
|
||||
if (!is_power_of_2(rotation & DRM_MODE_ROTATE_MASK))
|
||||
return -EINVAL;
|
||||
|
||||
mode->rotation_reflection = rotation;
|
||||
|
||||
return 0;
|
||||
|
@ -280,12 +280,8 @@ static void panfrost_job_cleanup(struct kref *ref)
|
||||
}
|
||||
|
||||
if (job->bos) {
|
||||
struct panfrost_gem_object *bo;
|
||||
|
||||
for (i = 0; i < job->bo_count; i++) {
|
||||
bo = to_panfrost_bo(job->bos[i]);
|
||||
for (i = 0; i < job->bo_count; i++)
|
||||
drm_gem_object_put_unlocked(job->bos[i]);
|
||||
}
|
||||
|
||||
kvfree(job->bos);
|
||||
}
|
||||
|
@ -151,7 +151,12 @@ u32 panfrost_mmu_as_get(struct panfrost_device *pfdev, struct panfrost_mmu *mmu)
|
||||
as = mmu->as;
|
||||
if (as >= 0) {
|
||||
int en = atomic_inc_return(&mmu->as_count);
|
||||
WARN_ON(en >= NUM_JOB_SLOTS);
|
||||
|
||||
/*
|
||||
* AS can be retained by active jobs or a perfcnt context,
|
||||
* hence the '+ 1' here.
|
||||
*/
|
||||
WARN_ON(en >= (NUM_JOB_SLOTS + 1));
|
||||
|
||||
list_move(&mmu->list, &pfdev->as_lru_list);
|
||||
goto out;
|
||||
|
@ -73,7 +73,7 @@ static int panfrost_perfcnt_enable_locked(struct panfrost_device *pfdev,
|
||||
struct panfrost_file_priv *user = file_priv->driver_priv;
|
||||
struct panfrost_perfcnt *perfcnt = pfdev->perfcnt;
|
||||
struct drm_gem_shmem_object *bo;
|
||||
u32 cfg;
|
||||
u32 cfg, as;
|
||||
int ret;
|
||||
|
||||
if (user == perfcnt->user)
|
||||
@ -126,12 +126,8 @@ static int panfrost_perfcnt_enable_locked(struct panfrost_device *pfdev,
|
||||
|
||||
perfcnt->user = user;
|
||||
|
||||
/*
|
||||
* Always use address space 0 for now.
|
||||
* FIXME: this needs to be updated when we start using different
|
||||
* address space.
|
||||
*/
|
||||
cfg = GPU_PERFCNT_CFG_AS(0) |
|
||||
as = panfrost_mmu_as_get(pfdev, perfcnt->mapping->mmu);
|
||||
cfg = GPU_PERFCNT_CFG_AS(as) |
|
||||
GPU_PERFCNT_CFG_MODE(GPU_PERFCNT_CFG_MODE_MANUAL);
|
||||
|
||||
/*
|
||||
@ -195,6 +191,7 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
|
||||
drm_gem_shmem_vunmap(&perfcnt->mapping->obj->base.base, perfcnt->buf);
|
||||
perfcnt->buf = NULL;
|
||||
panfrost_gem_close(&perfcnt->mapping->obj->base.base, file_priv);
|
||||
panfrost_mmu_as_put(pfdev, perfcnt->mapping->mmu);
|
||||
panfrost_gem_mapping_put(perfcnt->mapping);
|
||||
perfcnt->mapping = NULL;
|
||||
pm_runtime_mark_last_busy(pfdev->dev);
|
||||
|
@ -53,6 +53,7 @@ cmdline_test(drm_cmdline_test_rotate_0)
|
||||
cmdline_test(drm_cmdline_test_rotate_90)
|
||||
cmdline_test(drm_cmdline_test_rotate_180)
|
||||
cmdline_test(drm_cmdline_test_rotate_270)
|
||||
cmdline_test(drm_cmdline_test_rotate_multiple)
|
||||
cmdline_test(drm_cmdline_test_rotate_invalid_val)
|
||||
cmdline_test(drm_cmdline_test_rotate_truncated)
|
||||
cmdline_test(drm_cmdline_test_hmirror)
|
||||
|
@ -856,6 +856,17 @@ static int drm_cmdline_test_rotate_270(void *ignored)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int drm_cmdline_test_rotate_multiple(void *ignored)
|
||||
{
|
||||
struct drm_cmdline_mode mode = { };
|
||||
|
||||
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480,rotate=0,rotate=90",
|
||||
&no_connector,
|
||||
&mode));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int drm_cmdline_test_rotate_invalid_val(void *ignored)
|
||||
{
|
||||
struct drm_cmdline_mode mode = { };
|
||||
@ -888,7 +899,7 @@ static int drm_cmdline_test_hmirror(void *ignored)
|
||||
FAIL_ON(!mode.specified);
|
||||
FAIL_ON(mode.xres != 720);
|
||||
FAIL_ON(mode.yres != 480);
|
||||
FAIL_ON(mode.rotation_reflection != DRM_MODE_REFLECT_X);
|
||||
FAIL_ON(mode.rotation_reflection != (DRM_MODE_ROTATE_0 | DRM_MODE_REFLECT_X));
|
||||
|
||||
FAIL_ON(mode.refresh_specified);
|
||||
|
||||
@ -913,7 +924,7 @@ static int drm_cmdline_test_vmirror(void *ignored)
|
||||
FAIL_ON(!mode.specified);
|
||||
FAIL_ON(mode.xres != 720);
|
||||
FAIL_ON(mode.yres != 480);
|
||||
FAIL_ON(mode.rotation_reflection != DRM_MODE_REFLECT_Y);
|
||||
FAIL_ON(mode.rotation_reflection != (DRM_MODE_ROTATE_0 | DRM_MODE_REFLECT_Y));
|
||||
|
||||
FAIL_ON(mode.refresh_specified);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user