lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d63940e-1cc2-a03e-a253-dac4d697e7d1@collabora.com>
Date:   Wed, 23 Nov 2022 19:40:10 +0300
From:   Dmitry Osipenko <dmitry.osipenko@...labora.com>
To:     Steven Price <steven.price@....com>,
        David Airlie <airlied@...il.com>,
        Gerd Hoffmann <kraxel@...hat.com>,
        Gurchetan Singh <gurchetansingh@...omium.org>,
        Chia-I Wu <olvaffe@...il.com>, Daniel Vetter <daniel@...ll.ch>,
        Daniel Almeida <daniel.almeida@...labora.com>,
        Gustavo Padovan <gustavo.padovan@...labora.com>,
        Daniel Stone <daniel@...ishbar.org>,
        Tomeu Vizoso <tomeu.vizoso@...labora.com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Rob Clark <robdclark@...il.com>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Christian König <christian.koenig@....com>,
        Qiang Yu <yuq825@...il.com>,
        Alyssa Rosenzweig <alyssa.rosenzweig@...labora.com>,
        Rob Herring <robh@...nel.org>, Sean Paul <sean@...rly.run>,
        Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
        Abhinav Kumar <quic_abhinavk@...cinc.com>
Cc:     kernel@...labora.com, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org,
        virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH v9 03/11] drm/gem: Add evict() callback to
 drm_gem_object_funcs

On 11/23/22 18:58, Steven Price wrote:
> On 23/11/2022 02:57, Dmitry Osipenko wrote:
>> Add new common evict() callback to drm_gem_object_funcs and corresponding
>> drm_gem_object_evict() helper. This is a first step on a way to providing
>> common GEM-shrinker API for DRM drivers.
>>
>> Suggested-by: Thomas Zimmermann <tzimmermann@...e.de>
>> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@...labora.com>
>> ---
>>  drivers/gpu/drm/drm_gem.c | 15 +++++++++++++++
>>  include/drm/drm_gem.h     | 12 ++++++++++++
>>  2 files changed, 27 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
>> index 299bca1390aa..c0510b8080d2 100644
>> --- a/drivers/gpu/drm/drm_gem.c
>> +++ b/drivers/gpu/drm/drm_gem.c
>> @@ -1458,3 +1458,18 @@ drm_gem_lru_scan(struct drm_gem_lru *lru,
>>  	return freed;
>>  }
>>  EXPORT_SYMBOL(drm_gem_lru_scan);
>> +
>> +/**
>> + * drm_gem_object_evict - helper to evict backing pages for a GEM object
>> + * @obj: obj in question
>> + */
>> +bool
>> +drm_gem_object_evict(struct drm_gem_object *obj)
>> +{
>> +	dma_resv_assert_held(obj->resv);
>> +
>> +	if (obj->funcs->evict)
>> +		return obj->funcs->evict(obj);
>> +
>> +	return false;
>> +}
> 
> This function needs exporting for the module build to work correctly.

Indeed, I missed that drm-shmem can be built as a separate module.

-- 
Best regards,
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ