All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo@padovan.org>
To: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Cc: airlied@redhat.com, dri-devel@lists.freedesktop.org,
	daniel.vetter@ffwll.ch
Subject: Re: [PATCH 2/3] drm: qxl: Open code probing sequence for qxl
Date: Mon, 16 Jan 2017 19:16:15 -0200	[thread overview]
Message-ID: <20170116211615.GJ16017@joana> (raw)
In-Reply-To: <20170112161610.19924-2-krisman@collabora.co.uk>

Hi Gabriel,

2017-01-12 Gabriel Krisman Bertazi <krisman@collabora.co.uk>:

> This avoids using the deprecated drm_get_pci_dev() and load() hook
> interfaces in the qxl driver.
> 
> The only tricky part is to ensure TTM debugfs initialization
> happens after the debugfs root node is created, which is done by moving
> that code into the debufs_init() hook.  Since the hook is called 3 times
> for each minor function, we make sure it is only executed for the
> primary minor.
> 
> Tested on qemu with igt and running a WM on top of X.
> 
> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
> CC: Dave Airlie <airlied@redhat.com>
> CC: Daniel Vetter <daniel.vetter@ffwll.ch>
> CC: dri-devel@lists.freedesktop.org
> ---
>  drivers/gpu/drm/qxl/qxl_debugfs.c | 12 ++++++++
>  drivers/gpu/drm/qxl/qxl_drv.c     | 58 +++++++++++++++++++++++++++++++++++++--
>  drivers/gpu/drm/qxl/qxl_drv.h     |  7 ++++-
>  drivers/gpu/drm/qxl/qxl_kms.c     | 40 ++-------------------------
>  drivers/gpu/drm/qxl/qxl_ttm.c     |  8 +-----
>  5 files changed, 77 insertions(+), 48 deletions(-)
> 
> diff --git a/drivers/gpu/drm/qxl/qxl_debugfs.c b/drivers/gpu/drm/qxl/qxl_debugfs.c
> index 241af9131dc8..417b538b3ed8 100644
> --- a/drivers/gpu/drm/qxl/qxl_debugfs.c
> +++ b/drivers/gpu/drm/qxl/qxl_debugfs.c
> @@ -84,8 +84,20 @@ int
>  qxl_debugfs_init(struct drm_minor *minor)
>  {
>  #if defined(CONFIG_DEBUG_FS)
> +	int r;
> +	struct qxl_device *dev =
> +		(struct qxl_device *) minor->dev->dev_private;
> +
>  	drm_debugfs_create_files(qxl_debugfs_list, QXL_DEBUGFS_ENTRIES,
>  				 minor->debugfs_root, minor);
> +
> +	if (minor->type == DRM_MINOR_PRIMARY) {

I'm not confortable with exposing minor->type here and making qxl
the first driver to use it outside of drm core. Don't we have any other
way. 

I see that inside qxl_debugfs_add_files() we have a check for already
registered files. Wouldn't that or some modification around work for
this?

Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-01-16 21:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 16:16 [PATCH 1/3] drm: qxl: Let DRM core handle connector registering Gabriel Krisman Bertazi
2017-01-12 16:16 ` [PATCH 2/3] drm: qxl: Open code probing sequence for qxl Gabriel Krisman Bertazi
2017-01-16 21:16   ` Gustavo Padovan [this message]
2017-01-17 13:15     ` Gabriel Krisman Bertazi
2017-01-12 16:16 ` [PATCH 3/3] drm: qxl: Open code teardown function " Gabriel Krisman Bertazi
2017-01-17 12:41 ` [PATCH 1/3] drm: qxl: Let DRM core handle connector registering Gustavo Padovan

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=20170116211615.GJ16017@joana \
    --to=gustavo@padovan.org \
    --cc=airlied@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krisman@collabora.co.uk \
    /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.