public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
	"open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" 
	<nouveau@lists.freedesktop.org>, Sandy Huang <hjc@rock-chips.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	"open list:RADEON and AMDGPU DRM DRIVERS" 
	<amd-gfx@lists.freedesktop.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	"open list:ARM/Rockchip SoC support" 
	<linux-rockchip@lists.infradead.org>,
	Ben Skeggs <bskeggs@redhat.com>,
	Russell King <linux+etnaviv@armlinux.org.uk>,
	"moderated list:DRM DRIVERS FOR XEN"
	<xen-devel@lists.xenproject.org>,
	"open list:DRM DRIVER FOR MSM ADRENO GPU" 
	<linux-arm-msm@vger.kernel.org>,
	"moderated list:DRM DRIVERS FOR VIVANTE GPU IP" 
	<etnaviv@lists.freedesktop.org>,
	"open list:DRM DRIVERS FOR NVIDIA TEGRA" 
	<linux-tegra@vger.kernel.org>, Sean Paul <sean@poorly.run>,
	"moderated list:ARM/Rockchip SoC support" 
	<linux-arm-kernel@lists.infradead.org>,
	open list <linux-kernel@vger.kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Alex Deucher <alexander.deucher@amd.com>,
	"open list:DRM DRIVER FOR MSM ADRENO GPU" 
	<freedreno@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm: allow limiting the scatter list size.
Date: Tue, 18 Aug 2020 10:31:19 +0200	[thread overview]
Message-ID: <03c03129-db27-c6da-df8f-909141d2a3f7@amd.com> (raw)
In-Reply-To: <20200818082703.7z6fcvoymiqow5kw@sirius.home.kraxel.org>

Am 18.08.20 um 10:27 schrieb Gerd Hoffmann:
> On Tue, Aug 18, 2020 at 09:57:59AM +0200, Christian König wrote:
>> Am 18.08.20 um 09:48 schrieb Gerd Hoffmann:
>>> Add max_segment argument to drm_prime_pages_to_sg().  When set pass it
>>> through to the __sg_alloc_table_from_pages() call, otherwise use
>>> SCATTERLIST_MAX_SEGMENT.
>>>
>>> Also add max_segment field to gem objects and pass it to
>>> drm_prime_pages_to_sg() calls in drivers and helpers.
>>>
>>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>> I'm missing an explanation why this should be useful (it certainly is).
> virtio-gpu needs this to work properly with SEV (see patch 2/2 of this
> series).

Yeah, that's the problem patch 2/2 never showed up here :)

>> And the maximum segment size seems misplaced in the GEM object. This is
>> usually a property of the device or even completely constant.
> Placing it in drm_device instead would indeed work for virtio-gpu, so I
> guess you are suggesting that instead?

That is probably the best approach, yes.

For Intel and AMD it could even be global/constant, but it certainly 
doesn't needs to be kept around for each buffer.

Christian.

>
> take care,
>    Gerd
>


  reply	other threads:[~2020-08-18  8:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200818074828.9509-1-kraxel@redhat.com>
2020-08-18  7:48 ` [PATCH 1/2] drm: allow limiting the scatter list size Gerd Hoffmann
2020-08-18  7:57   ` Christian König
2020-08-18  8:27     ` Gerd Hoffmann
2020-08-18  8:31       ` Christian König [this message]
2020-08-18  9:00         ` Gerd Hoffmann
2020-08-18  7:48 ` [PATCH 2/2] drm/virtio: set max_segment 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=03c03129-db27-c6da-df8f-909141d2a3f7@amd.com \
    --to=christian.koenig@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=etnaviv@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=hjc@rock-chips.com \
    --cc=jonathanh@nvidia.com \
    --cc=kraxel@redhat.com \
    --cc=linux+etnaviv@armlinux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=sean@poorly.run \
    --cc=thierry.reding@gmail.com \
    --cc=tzimmermann@suse.de \
    --cc=xen-devel@lists.xenproject.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