From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: "Michel Dänzer" <michel@daenzer.net>, amd-gfx@lists.freedesktop.org
Cc: Emil Velikov <emil.l.velikov@gmail.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm 0/9] amdgpu:
Date: Mon, 24 Jun 2019 19:31:14 +0200 [thread overview]
Message-ID: <b48aae10-c1db-b76b-ddde-9c0a47028633@gmail.com> (raw)
In-Reply-To: <20190624165406.13682-1-michel@daenzer.net>
Patches #1 - #3 look good to me, but I'm not sure if the rest is such a
good idea.
Basically you not only want to use the same FD for CS, but also for
basically all buffer functions and as far as I can see we break that here.
I would rather add a new function to export the KMS handle for a certain
BO/FD pair. Exporting the handle based on a type was also like trying to
squeeze a round pig through a square hole in the first place.
KMS, flink and DMA-buf fd are fundamentally different and shouldn't be
handled by the same function in the first place.
The only tricky part in this scenario is to know when to close the KMS
handle again.
Christian.
Am 24.06.19 um 18:53 schrieb Michel Dänzer:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> The motivation for these patches is https://bugs.freedesktop.org/110903 .
>
> Patches 1-3 are preparatory.
>
> Patches 4 & 5 are the core patches allowing the issues discussed in the
> bug report to be fixed.
>
> Patches 6-8 are further optimizations / cleanups.
>
> Patch 9 is the Mesa patch making use of the new
> amdgpu_bo_handle_type_kms_user API to fix the user visible problem.
>
> Note that the libdrm patches need to land first, a libdrm release needs
> to be made, and the Mesa patch needs to bump the libdrm_amdgpu version
> requirement to that release's version before it can land.
>
> Michel Dänzer (9):
> amdgpu: Pass file descriptor directly to amdgpu_close_kms_handle
> amdgpu: Add BO handle to table in amdgpu_bo_create
> amdgpu: Rename fd_mutex/list to dev_mutex/list
> amdgpu: Add struct amdgpu_core_device and amdgpu_core_bo
> amdgpu: Add amdgpu_bo_handle_type_kms_user
> amdgpu: Re-use an existing amdgpu_device when possible
> amdgpu: Use normal integers for device / core BO reference counting
> amdgpu: Drop refcount member from struct amdgpu_core_bo/device
> winsys/amdgpu: Use amdgpu_bo_handle_type_kms_user for API KMS handles
>
> amdgpu/amdgpu.h | 14 +-
> amdgpu/amdgpu_asic_id.c | 4 +-
> amdgpu/amdgpu_bo.c | 367 ++++++++++++++++++++++------------
> amdgpu/amdgpu_cs.c | 64 +++---
> amdgpu/amdgpu_device.c | 281 +++++++++++++-------------
> amdgpu/amdgpu_gpu_info.c | 35 ++--
> amdgpu/amdgpu_internal.h | 31 ++-
> amdgpu/amdgpu_vamgr.c | 9 +-
> amdgpu/amdgpu_vm.c | 4 +-
> tests/amdgpu/amdgpu_test.c | 2 +-
> tests/amdgpu/bo_tests.c | 2 +-
> tests/amdgpu/cs_tests.c | 8 +-
> tests/amdgpu/deadlock_tests.c | 8 +-
> tests/amdgpu/uvd_enc_tests.c | 2 +-
> tests/amdgpu/vce_tests.c | 12 +-
> tests/amdgpu/vcn_tests.c | 4 +-
> tests/amdgpu/vm_tests.c | 2 +-
> 17 files changed, 500 insertions(+), 349 deletions(-)
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-06-24 17:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 16:53 [PATCH libdrm 0/9] amdgpu: Michel Dänzer
[not found] ` <20190624165406.13682-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-06-24 16:53 ` [PATCH libdrm 1/9] amdgpu: Pass file descriptor directly to amdgpu_close_kms_handle Michel Dänzer
2019-06-28 17:11 ` Emil Velikov
2019-06-24 16:53 ` [PATCH libdrm 2/9] amdgpu: Add BO handle to table in amdgpu_bo_create Michel Dänzer
2019-06-24 16:54 ` [PATCH libdrm 3/9] amdgpu: Rename fd_mutex/list to dev_mutex/list Michel Dänzer
2019-06-24 16:54 ` [PATCH libdrm 8/9] amdgpu: Drop refcount member from struct amdgpu_core_bo/device Michel Dänzer
2019-06-24 16:54 ` [PATCH mesa 9/9] winsys/amdgpu: Use amdgpu_bo_handle_type_kms_user for API KMS handles Michel Dänzer
2019-06-24 16:54 ` [PATCH libdrm 4/9] amdgpu: Add struct amdgpu_core_device and amdgpu_core_bo Michel Dänzer
2019-06-24 16:54 ` [PATCH libdrm 5/9] amdgpu: Add amdgpu_bo_handle_type_kms_user Michel Dänzer
2019-06-24 16:54 ` [PATCH libdrm 6/9] amdgpu: Re-use an existing amdgpu_device when possible Michel Dänzer
2019-06-24 16:54 ` [PATCH libdrm 7/9] amdgpu: Use normal integers for device / core BO reference counting Michel Dänzer
2019-06-24 17:31 ` Christian König [this message]
[not found] ` <b48aae10-c1db-b76b-ddde-9c0a47028633-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-06-25 8:02 ` [PATCH libdrm 0/9] amdgpu: Michel Dänzer
2019-06-25 9:44 ` Koenig, Christian
[not found] ` <78d5a7c1-8534-7917-58bc-1827dff106c8-5C7GfCeVMHo@public.gmane.org>
2019-06-25 10:07 ` Michel Dänzer
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=b48aae10-c1db-b76b-ddde-9c0a47028633@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=michel@daenzer.net \
/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