All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: feng.tang@intel.com, dave@stgolabs.net, rong.a.chen@intel.com,
	airlied@linux.ie, dri-devel@lists.freedesktop.org,
	maxime.ripard@bootlin.com, ying.huang@intel.com, sean@poorly.run
Subject: Re: [PATCH v3 3/3] drm/vram: Implement lazy unmapping for GEM VRAM buffers
Date: Fri, 6 Sep 2019 12:37:47 +0200	[thread overview]
Message-ID: <b08a47cf-8e2f-6632-7704-94c8ec4421d4@suse.de> (raw)
In-Reply-To: <20190906093905.umz4wkwn4lukg2jg@sirius.home.kraxel.org>


[-- Attachment #1.1.1: Type: text/plain, Size: 992 bytes --]

Hi

Am 06.09.19 um 11:39 schrieb Gerd Hoffmann:
>> +void drm_gem_vram_bo_driver_move_notify(struct ttm_buffer_object *bo,
>> +					bool evict,
>> +					struct ttm_mem_reg *new_mem)
>> +{
> [ ... ]
>> +	if (!kmap->virtual)
>> +		return;
>> +	ttm_bo_kunmap(kmap);
>> +	kmap->virtual = NULL;
>> +}
> 
> I think ttm_buffer_object_destroy() needs "if (kmap->virtual)
> ttm_bo_kunmap()" too, due to the lazy unmap you can land there
> with an active mapping.

Hmm, from my understanding, that final call to move_notify() is done by
ttm_bo_cleanup_memtype_use(), which is called from within ttm_bo_put().

If we want to add a final kunmap, There's also the release_notify()
callback, which is probably the right place to put it.

Best regards
Thomas

> 
> cheers,
>   Gerd
> 

-- 
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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

  reply	other threads:[~2019-09-06 10:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06  8:52 [PATCH v3 0/3] Implement lazy unmapping for GEM VRAM buffers Thomas Zimmermann
2019-09-06  8:52 ` [PATCH v3 1/3] drm/vram: Add kmap ref-counting to GEM VRAM objects Thomas Zimmermann
2019-09-06  9:09   ` Daniel Vetter
2019-09-06  8:52 ` [PATCH v3 2/3] drm/vram: Add infrastructure for move_notify() Thomas Zimmermann
2019-09-06  9:28   ` Daniel Vetter
2019-09-06 10:24     ` Thomas Zimmermann
2019-09-06 13:05       ` Daniel Vetter
2019-09-06 14:01         ` Thomas Zimmermann
2019-09-06  8:52 ` [PATCH v3 3/3] drm/vram: Implement lazy unmapping for GEM VRAM buffers Thomas Zimmermann
2019-09-06  9:39   ` Gerd Hoffmann
2019-09-06 10:37     ` Thomas Zimmermann [this message]
2019-09-06 11:18       ` Gerd Hoffmann

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=b08a47cf-8e2f-6632-7704-94c8ec4421d4@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=dave@stgolabs.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=feng.tang@intel.com \
    --cc=kraxel@redhat.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=rong.a.chen@intel.com \
    --cc=sean@poorly.run \
    --cc=ying.huang@intel.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.