From: Inki Dae <inki.dae@samsung.com>
To: "Daniel Vetter" <daniel@ffwll.ch>, "Noralf Trønnes" <noralf@tronnes.org>
Cc: jy0922.shim@samsung.com, daniel.vetter@ffwll.ch,
tomi.valkeinen@ti.com, sw0312.kim@samsung.com,
dri-devel@lists.freedesktop.org, hdegoede@redhat.com,
kyungmin.park@samsung.com, bskeggs@redhat.com,
rodrigo.vivi@intel.com, alexander.deucher@amd.com,
linux@armlinux.org.uk, intel-gfx@lists.freedesktop.org,
christian.koenig@amd.com, mark.yao@rock-chips.com
Subject: Re: [PATCH v2 06/15] drm/exynos: Use drm_fb_helper_lastclose() and _poll_changed()
Date: Thu, 09 Nov 2017 17:37:14 +0900 [thread overview]
Message-ID: <5A0413BA.3070806@samsung.com> (raw)
In-Reply-To: <20171031102841.ff5x6zndkkdfdwey@phenom.ffwll.local>
2017년 10월 31일 19:28에 Daniel Vetter 이(가) 쓴 글:
> On Mon, Oct 30, 2017 at 04:39:42PM +0100, Noralf Trønnes wrote:
>> This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
>> It can also use drm_fb_helper_output_poll_changed() as its
>> .output_poll_changed callback.
>>
>> Cc: Inki Dae <inki.dae@samsung.com>
>> Cc: Joonyoung Shim <jy0922.shim@samsung.com>
>> Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
>> Cc: Kyungmin Park <kyungmin.park@samsung.com>
>> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
>> ---
>> drivers/gpu/drm/exynos/exynos_drm_drv.c | 8 ++------
>> drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +-
>> drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 18 ------------------
>> drivers/gpu/drm/exynos/exynos_drm_fbdev.h | 2 --
>> 4 files changed, 3 insertions(+), 27 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> index e651a58c18cf..70f4895ac49c 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> @@ -16,6 +16,7 @@
>> #include <drm/drm_atomic.h>
>> #include <drm/drm_atomic_helper.h>
>> #include <drm/drm_crtc_helper.h>
>> +#include <drm/drm_fb_helper.h>
>>
>> #include <linux/component.h>
>>
>> @@ -89,11 +90,6 @@ static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file)
>> file->driver_priv = NULL;
>> }
>>
>> -static void exynos_drm_lastclose(struct drm_device *dev)
>> -{
>> - exynos_drm_fbdev_restore_mode(dev);
>> -}
>> -
>> static const struct vm_operations_struct exynos_drm_gem_vm_ops = {
>> .fault = exynos_drm_gem_fault,
>> .open = drm_gem_vm_open,
>> @@ -140,7 +136,7 @@ static struct drm_driver exynos_drm_driver = {
>> .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME
>> | DRIVER_ATOMIC | DRIVER_RENDER,
>> .open = exynos_drm_open,
>> - .lastclose = exynos_drm_lastclose,
>> + .lastclose = drm_fb_helper_lastclose,
>> .postclose = exynos_drm_postclose,
>> .gem_free_object_unlocked = exynos_drm_gem_free_object,
>> .gem_vm_ops = &exynos_drm_gem_vm_ops,
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
>> index 8208df56a88f..0faaf829f5bf 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
>> @@ -205,7 +205,7 @@ static struct drm_mode_config_helper_funcs exynos_drm_mode_config_helpers = {
>>
>> static const struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {
>> .fb_create = exynos_user_fb_create,
>> - .output_poll_changed = exynos_drm_output_poll_changed,
>> + .output_poll_changed = drm_fb_helper_output_poll_changed,
>> .atomic_check = exynos_atomic_check,
>> .atomic_commit = drm_atomic_helper_commit,
>> };
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
>> index dfb66ecf417b..132dd52d0ac7 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
>> @@ -270,24 +270,6 @@ void exynos_drm_fbdev_fini(struct drm_device *dev)
>> private->fb_helper = NULL;
>> }
>>
>> -void exynos_drm_fbdev_restore_mode(struct drm_device *dev)
>> -{
>> - struct exynos_drm_private *private = dev->dev_private;
>> -
>> - if (!private || !private->fb_helper)
>
> Not sure this isn't risky, exynos has a strange load sequence ... Probably
> best if we get an ack from Inki.
I didn't test this patch on real hardware due to below two issues,
1. many warning messages printed out at vblank period.
- to finalize atomic flush drm_crtc_arm_vblank_event function is called but Exynos drm driver has no implementation of get_vblank_timestamp and get_scanout_position callbacks.
2. tranferring Panel commands to Panel device - s6e3ha2 Panel device - timed out when exynos_drm_fbdev_restore_mode is called.
So I just looked into this patch and looks good to me.
Only a difference between old and new helper functions is above condition - checking if private and private->fb_helper are null or not.
And dev->dev_private and private->fb_helper are cleared after calling drm_dev_unregister function which calls drm_fb_helpaer_lastclose function so it must be no problem.
Acked-by: Inki Dae <inki.dae@samsung.com>
Thanks,
Inki Dae
> -Daniel
>> - return;
>> -
>> - drm_fb_helper_restore_fbdev_mode_unlocked(private->fb_helper);
>> -}
>> -
>> -void exynos_drm_output_poll_changed(struct drm_device *dev)
>> -{
>> - struct exynos_drm_private *private = dev->dev_private;
>> - struct drm_fb_helper *fb_helper = private->fb_helper;
>> -
>> - drm_fb_helper_hotplug_event(fb_helper);
>> -}
>> -
>> void exynos_drm_fbdev_suspend(struct drm_device *dev)
>> {
>> struct exynos_drm_private *private = dev->dev_private;
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.h b/drivers/gpu/drm/exynos/exynos_drm_fbdev.h
>> index 645d1bb7f665..b33847223a85 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.h
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.h
>> @@ -19,8 +19,6 @@
>>
>> int exynos_drm_fbdev_init(struct drm_device *dev);
>> void exynos_drm_fbdev_fini(struct drm_device *dev);
>> -void exynos_drm_fbdev_restore_mode(struct drm_device *dev);
>> -void exynos_drm_output_poll_changed(struct drm_device *dev);
>> void exynos_drm_fbdev_suspend(struct drm_device *drm);
>> void exynos_drm_fbdev_resume(struct drm_device *drm);
>>
>> --
>> 2.14.2
>>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-11-09 8:37 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-30 15:39 [PATCH v2 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
2017-10-30 15:39 ` [PATCH v2 01/15] drm/fb-helper: Handle function NULL argument Noralf Trønnes
2017-10-30 15:39 ` [PATCH v2 02/15] drm: Add drm_device->fb_helper pointer Noralf Trønnes
2017-10-30 15:39 ` [PATCH v2 03/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
2017-10-30 15:39 ` [PATCH v2 04/15] drm/amdgpu: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
2017-10-30 15:39 ` [PATCH v2 05/15] drm/armada: " Noralf Trønnes
2017-10-31 17:11 ` Russell King - ARM Linux
2017-10-30 15:39 ` [PATCH v2 06/15] drm/exynos: " Noralf Trønnes
2017-10-31 10:28 ` Daniel Vetter
2017-11-09 8:37 ` Inki Dae [this message]
2017-10-30 15:39 ` [PATCH v2 07/15] drm/gma500: " Noralf Trønnes
2017-10-31 10:28 ` Daniel Vetter
2017-10-30 15:39 ` [PATCH v2 08/15] drm/i915: Use drm_fb_helper_output_poll_changed() Noralf Trønnes
2017-10-31 10:27 ` Daniel Vetter
2017-10-31 14:26 ` Noralf Trønnes
2017-10-31 16:34 ` Daniel Vetter
2017-10-30 15:39 ` [PATCH v2 09/15] drm/msm: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
2017-10-30 15:39 ` [PATCH v2 10/15] drm/nouveau: Use drm_fb_helper_output_poll_changed() Noralf Trønnes
2017-10-30 15:39 ` [PATCH v2 11/15] drm/omap: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
2017-10-30 15:39 ` [PATCH v2 12/15] drm/radeon: " Noralf Trønnes
2017-10-30 15:39 ` [PATCH v2 13/15] drm/rockchip: " Noralf Trønnes
2017-10-30 15:39 ` [PATCH v2 14/15] drm/tegra: " Noralf Trønnes
2017-10-30 15:39 ` [PATCH v2 15/15] staging: vboxvideo: Use drm_fb_helper_lastclose() Noralf Trønnes
2017-10-31 10:32 ` Daniel Vetter
2017-10-31 14:40 ` Noralf Trønnes
2017-10-31 16:35 ` Daniel Vetter
2017-10-30 16:36 ` ✗ Fi.CI.BAT: failure for drm/fb-helper: Add .last_close and .output_poll_changed helpers (rev2) Patchwork
2017-10-31 18:26 ` [PATCH v2 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
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=5A0413BA.3070806@samsung.com \
--to=inki.dae@samsung.com \
--cc=alexander.deucher@amd.com \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jy0922.shim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux@armlinux.org.uk \
--cc=mark.yao@rock-chips.com \
--cc=noralf@tronnes.org \
--cc=rodrigo.vivi@intel.com \
--cc=sw0312.kim@samsung.com \
--cc=tomi.valkeinen@ti.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.