From: Jani Nikula <jani.nikula@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org,
Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>,
Emil Velikov <emil.velikov@collabora.com>
Subject: Re: [PATCH] drm: Add frame CRC debugfs files only for drivers that have CRTC
Date: Thu, 29 Sep 2016 10:54:06 +0300 [thread overview]
Message-ID: <87k2dv5eg1.fsf@intel.com> (raw)
In-Reply-To: <1475120520-20156-1-git-send-email-dhinakaran.pandiyan@intel.com>
On Thu, 29 Sep 2016, Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> wrote:
> vgem does not do modeset, looping through non-existent CRTC's while
> registering drm_minor in
>
> 'commit 48c787899882 ("drm: Add API for capturing frame CRCs")'
>
> caused kernel oops. So, let's add CRC debugfs files
> only for those drivers that do modeset.
>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Emil Velikov <emil.velikov@collabora.com>
Fixes: 48c787899882 ("drm: Add API for capturing frame CRCs")
Dhinakaran, for future reference, please add the kernel oops to the
commit messages. It'll help reviewing the patch and matching other bug
reports to the fix.
Tomeu, Emil, please review ASAP. This started oopsing all over the place
in our CI... we'll need to start running pre-merge testing on patches on
dri-devel too, like we do on intel-gfx. (Hint, for now, Cc'ing intel-gfx
on drm patches will run our CI on it.)
Thanks,
Jani.
> ---
> drivers/gpu/drm/drm_drv.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 70d2543..294404f 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -208,6 +208,7 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)
> struct drm_crtc *crtc;
> unsigned long flags;
> int ret;
> + bool is_modeset;
>
> DRM_DEBUG("\n");
>
> @@ -221,7 +222,8 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)
> return ret;
> }
>
> - if (type == DRM_MINOR_PRIMARY) {
> + is_modeset = drm_core_check_feature(dev, DRIVER_MODESET);
> + if (type == DRM_MINOR_PRIMARY && is_modeset) {
> drm_for_each_crtc(crtc, dev) {
> ret = drm_debugfs_crtc_add(crtc);
> if (ret)
> @@ -255,12 +257,14 @@ static void drm_minor_unregister(struct drm_device *dev, unsigned int type)
> struct drm_minor *minor;
> struct drm_crtc *crtc;
> unsigned long flags;
> + bool is_modeset;
>
> minor = *drm_minor_get_slot(dev, type);
> if (!minor || !device_is_registered(minor->kdev))
> return;
>
> - if (type == DRM_MINOR_PRIMARY) {
> + is_modeset = drm_core_check_feature(dev, DRIVER_MODESET);
> + if (type == DRM_MINOR_PRIMARY && is_modeset) {
> drm_for_each_crtc(crtc, dev)
> drm_debugfs_crtc_remove(crtc);
> }
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-09-29 7:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-29 3:42 [PATCH] drm: Add frame CRC debugfs files only for drivers that have CRTC Dhinakaran Pandiyan
2016-09-29 3:50 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-09-29 7:54 ` Jani Nikula [this message]
2016-09-29 8:25 ` [PATCH] " Tomeu Vizoso
2016-09-29 8:59 ` Daniel Vetter
2016-09-29 10:27 ` [Intel-gfx] " Emil Velikov
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=87k2dv5eg1.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dhinakaran.pandiyan@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.velikov@collabora.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tomeu.vizoso@collabora.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.