mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org,
	"open list:DRM DRIVER FOR QXL VIRTUAL GPU" 
	<virtualization@lists.linux-foundation.org>,
	Dave Airlie <airlied@redhat.com>,
	"open list:DRM DRIVER FOR QXL VIRTUAL GPU" 
	<spice-devel@lists.freedesktop.org>
Subject: Re: [PATCH 4/5] drm/qxl: use drm_gem_object_funcs callbacks
Date: Tue, 3 Sep 2019 08:52:27 +0200	[thread overview]
Message-ID: <61b2c31a-6d0a-c42d-a456-ea13b17c9aec@suse.de> (raw)
In-Reply-To: <20190903062417.a4gpgaollk5jruas@sirius.home.kraxel.org>


[-- Attachment #1.1: Type: text/plain, Size: 3482 bytes --]

Hi

Am 03.09.19 um 08:24 schrieb Gerd Hoffmann:
> On Mon, Sep 02, 2019 at 04:34:49PM +0200, Thomas Zimmermann wrote:
>> This patch seems unrelated.
> 
> Well, patch 5/5 depends on it because it hooks the
> drm_gem_ttm_print_info helper into the new
> qxl_object_funcs added by this patch.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>


> 
>> Am 02.09.19 um 14:41 schrieb Gerd Hoffmann:
>>> Switch qxl to use drm_gem_object_funcs callbacks
>>> instead of drm_driver callbacks.
>>>
>>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>>> ---
>>>  drivers/gpu/drm/qxl/qxl_drv.c    |  8 --------
>>>  drivers/gpu/drm/qxl/qxl_object.c | 12 ++++++++++++
>>>  2 files changed, 12 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
>>> index 2b726a51a302..996d428fa7e6 100644
>>> --- a/drivers/gpu/drm/qxl/qxl_drv.c
>>> +++ b/drivers/gpu/drm/qxl/qxl_drv.c
>>> @@ -258,16 +258,8 @@ static struct drm_driver qxl_driver = {
>>>  #endif
>>>  	.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
>>>  	.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
>>> -	.gem_prime_pin = qxl_gem_prime_pin,
>>> -	.gem_prime_unpin = qxl_gem_prime_unpin,
>>> -	.gem_prime_get_sg_table = qxl_gem_prime_get_sg_table,
>>>  	.gem_prime_import_sg_table = qxl_gem_prime_import_sg_table,
>>> -	.gem_prime_vmap = qxl_gem_prime_vmap,
>>> -	.gem_prime_vunmap = qxl_gem_prime_vunmap,
>>>  	.gem_prime_mmap = qxl_gem_prime_mmap,
>>> -	.gem_free_object_unlocked = qxl_gem_object_free,
>>> -	.gem_open_object = qxl_gem_object_open,
>>> -	.gem_close_object = qxl_gem_object_close,
>>>  	.fops = &qxl_fops,
>>>  	.ioctls = qxl_ioctls,
>>>  	.irq_handler = qxl_irq_handler,
>>> diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c
>>> index 548dfe6f3b26..29aab7b14513 100644
>>> --- a/drivers/gpu/drm/qxl/qxl_object.c
>>> +++ b/drivers/gpu/drm/qxl/qxl_object.c
>>> @@ -77,6 +77,17 @@ void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned)
>>>  	}
>>>  }
>>>  
>>> +static const struct drm_gem_object_funcs qxl_object_funcs = {
>>> +	.free = qxl_gem_object_free,
>>> +	.open = qxl_gem_object_open,
>>> +	.close = qxl_gem_object_close,
>>> +	.pin = qxl_gem_prime_pin,
>>> +	.unpin = qxl_gem_prime_unpin,
>>> +	.get_sg_table = qxl_gem_prime_get_sg_table,
>>> +	.vmap = qxl_gem_prime_vmap,
>>> +	.vunmap = qxl_gem_prime_vunmap,
>>> +};
>>> +
>>>  int qxl_bo_create(struct qxl_device *qdev,
>>>  		  unsigned long size, bool kernel, bool pinned, u32 domain,
>>>  		  struct qxl_surface *surf,
>>> @@ -100,6 +111,7 @@ int qxl_bo_create(struct qxl_device *qdev,
>>>  		kfree(bo);
>>>  		return r;
>>>  	}
>>> +	bo->tbo.base.funcs = &qxl_object_funcs;
>>>  	bo->type = domain;
>>>  	bo->pin_count = pinned ? 1 : 0;
>>>  	bo->surface_id = 0;
>>>
>>
>> -- 
>> Thomas Zimmermann
>> Graphics Driver Developer
>> SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
>> GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
>> HRB 21284 (AG Nürnberg)
>>
> 
> 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-09-03  6:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190902124126.7700-1-kraxel@redhat.com>
2019-09-02 12:41 ` [PATCH 1/5] drm/ttm: add drm_gem_ttm_print_info() Gerd Hoffmann
2019-09-02 14:19   ` Thomas Zimmermann
2019-09-03  6:15     ` Gerd Hoffmann
2019-09-02 12:41 ` [PATCH 2/5] drm/vram: use drm_gem_ttm_print_info Gerd Hoffmann
2019-09-02 14:24   ` Thomas Zimmermann
2019-09-03  6:17     ` Gerd Hoffmann
2019-09-02 12:41 ` [PATCH 3/5] drm/vram: add vram-mm debugfs file Gerd Hoffmann
2019-09-02 14:34   ` Thomas Zimmermann
2019-09-03  6:20     ` Gerd Hoffmann
2019-09-02 12:41 ` [PATCH 4/5] drm/qxl: use drm_gem_object_funcs callbacks Gerd Hoffmann
2019-09-02 14:34   ` Thomas Zimmermann
2019-09-03  6:24     ` Gerd Hoffmann
2019-09-03  6:52       ` Thomas Zimmermann [this message]
2019-09-02 12:41 ` [PATCH 5/5] drm/qxl: use drm_gem_ttm_print_info Gerd Hoffmann
2019-09-02 14:42   ` Thomas Zimmermann

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=61b2c31a-6d0a-c42d-a456-ea13b17c9aec@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spice-devel@lists.freedesktop.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®