From: Daniel Vetter <daniel@ffwll.ch>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
open list <linux-kernel@vger.kernel.org>,
"open list:DRM DRIVERS FOR E..."
<dri-devel@lists.freedesktop.org>,
drake@endlessm.com, Kyungmin Park <kyungmin.park@samsung.com>,
"moderated list:ARM/S5P EXYNOS AR..."
<linux-samsung-soc@vger.kernel.org>,
m.szyprowski@samsung.com
Subject: Re: [PATCH] drm/exynos: init vblank with real number of crtcs
Date: Fri, 19 Sep 2014 17:31:21 +0200 [thread overview]
Message-ID: <20140919153121.GC15734@phenom.ffwll.local> (raw)
In-Reply-To: <1411131440-15395-1-git-send-email-a.hajda@samsung.com>
On Fri, Sep 19, 2014 at 02:57:20PM +0200, Andrzej Hajda wrote:
> Initialization of vblank with MAX_CRTC caused attempts
> to disabling vblanks for non-existing crtcs in case
> drm used fewer crtcs. The patch fixes it.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_drv.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> index 9b00e4e..dc4affd 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> @@ -94,10 +94,6 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
> /* init kms poll for handling hpd */
> drm_kms_helper_poll_init(dev);
>
> - ret = drm_vblank_init(dev, MAX_CRTC);
> - if (ret)
> - goto err_mode_config_cleanup;
> -
> /* setup possible_clones. */
> exynos_drm_encoder_setup(dev);
>
> @@ -106,22 +102,26 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
> /* Try to bind all sub drivers. */
> ret = component_bind_all(dev->dev, dev);
> if (ret)
> - goto err_cleanup_vblank;
> + goto err_mode_config_cleanup;
> +
> + ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
Hm, I wonder whether we should have a drm_mode_vblank_init which dtrt here
for kms drivers? Suggestions for a better name welcome ;-)
-Daniel
> + if (ret)
> + goto err_unbind_all;
>
> /* Probe non kms sub drivers and virtual display driver. */
> ret = exynos_drm_device_subdrv_probe(dev);
> if (ret)
> - goto err_unbind_all;
> + goto err_cleanup_vblank;
>
> /* force connectors detection */
> drm_helper_hpd_irq_event(dev);
>
> return 0;
>
> -err_unbind_all:
> - component_unbind_all(dev->dev, dev);
> err_cleanup_vblank:
> drm_vblank_cleanup(dev);
> +err_unbind_all:
> + component_unbind_all(dev->dev, dev);
> err_mode_config_cleanup:
> drm_mode_config_cleanup(dev);
> drm_release_iommu_mapping(dev);
> @@ -138,8 +138,8 @@ static int exynos_drm_unload(struct drm_device *dev)
> exynos_drm_fbdev_fini(dev);
> drm_kms_helper_poll_fini(dev);
>
> - component_unbind_all(dev->dev, dev);
> drm_vblank_cleanup(dev);
> + component_unbind_all(dev->dev, dev);
> drm_mode_config_cleanup(dev);
> drm_release_iommu_mapping(dev);
>
> --
> 1.9.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>,
Joonyoung Shim <jy0922.shim@samsung.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
David Airlie <airlied@linux.ie>,
Kukjin Kim <kgene.kim@samsung.com>,
"open list:DRM DRIVERS FOR E..."
<dri-devel@lists.freedesktop.org>,
"moderated list:ARM/S5P EXYNOS AR..."
<linux-samsung-soc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
drake@endlessm.com, daniel@ffwll.ch, m.szyprowski@samsung.com
Subject: Re: [PATCH] drm/exynos: init vblank with real number of crtcs
Date: Fri, 19 Sep 2014 17:31:21 +0200 [thread overview]
Message-ID: <20140919153121.GC15734@phenom.ffwll.local> (raw)
In-Reply-To: <1411131440-15395-1-git-send-email-a.hajda@samsung.com>
On Fri, Sep 19, 2014 at 02:57:20PM +0200, Andrzej Hajda wrote:
> Initialization of vblank with MAX_CRTC caused attempts
> to disabling vblanks for non-existing crtcs in case
> drm used fewer crtcs. The patch fixes it.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_drv.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> index 9b00e4e..dc4affd 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> @@ -94,10 +94,6 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
> /* init kms poll for handling hpd */
> drm_kms_helper_poll_init(dev);
>
> - ret = drm_vblank_init(dev, MAX_CRTC);
> - if (ret)
> - goto err_mode_config_cleanup;
> -
> /* setup possible_clones. */
> exynos_drm_encoder_setup(dev);
>
> @@ -106,22 +102,26 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
> /* Try to bind all sub drivers. */
> ret = component_bind_all(dev->dev, dev);
> if (ret)
> - goto err_cleanup_vblank;
> + goto err_mode_config_cleanup;
> +
> + ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
Hm, I wonder whether we should have a drm_mode_vblank_init which dtrt here
for kms drivers? Suggestions for a better name welcome ;-)
-Daniel
> + if (ret)
> + goto err_unbind_all;
>
> /* Probe non kms sub drivers and virtual display driver. */
> ret = exynos_drm_device_subdrv_probe(dev);
> if (ret)
> - goto err_unbind_all;
> + goto err_cleanup_vblank;
>
> /* force connectors detection */
> drm_helper_hpd_irq_event(dev);
>
> return 0;
>
> -err_unbind_all:
> - component_unbind_all(dev->dev, dev);
> err_cleanup_vblank:
> drm_vblank_cleanup(dev);
> +err_unbind_all:
> + component_unbind_all(dev->dev, dev);
> err_mode_config_cleanup:
> drm_mode_config_cleanup(dev);
> drm_release_iommu_mapping(dev);
> @@ -138,8 +138,8 @@ static int exynos_drm_unload(struct drm_device *dev)
> exynos_drm_fbdev_fini(dev);
> drm_kms_helper_poll_fini(dev);
>
> - component_unbind_all(dev->dev, dev);
> drm_vblank_cleanup(dev);
> + component_unbind_all(dev->dev, dev);
> drm_mode_config_cleanup(dev);
> drm_release_iommu_mapping(dev);
>
> --
> 1.9.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-09-19 15:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 12:57 [PATCH] drm/exynos: init vblank with real number of crtcs Andrzej Hajda
2014-09-19 12:57 ` Andrzej Hajda
2014-09-19 15:31 ` Daniel Vetter [this message]
2014-09-19 15:31 ` Daniel Vetter
2014-10-07 12:27 ` Andrzej Hajda
2014-10-07 12:27 ` Andrzej Hajda
2014-10-07 15:28 ` Inki Dae
2014-10-08 1:33 ` Inki Dae
2014-10-08 1:33 ` Inki Dae
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140919153121.GC15734@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=a.hajda@samsung.com \
--cc=drake@endlessm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=sw0312.kim@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.