dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Christian König" <deathsimple@vodafone.de>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Maruthi.Bayyavarapu@amd.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 07/12] drm/amdgpu: implement cgs gpu memory callbacks
Date: Tue, 29 Sep 2015 17:20:09 +0200	[thread overview]
Message-ID: <20150929152009.GO3383@phenom.ffwll.local> (raw)
In-Reply-To: <560A8695.3070506@vodafone.de>

On Tue, Sep 29, 2015 at 02:39:49PM +0200, Christian König wrote:
> On 29.09.2015 13:40, Daniel Vetter wrote:
> >On Thu, Jul 09, 2015 at 12:21:06PM -0400, Alex Deucher wrote:
> >>From: Chunming Zhou <david1.zhou@amd.com>
> >>
> >>This implements the cgs interface for allocating
> >>GPU memory.
> >>
> >>Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
> >I don't see that review anywhere on a m-l ... where is it?
> 
> Jammy reviewed the stuff internally before we made it public, that's why you
> can't find it.
> 
> >
> >I stumbled over this patch because it adds a new dev->struct_mutex user
> >(that should be a big warning sign) and then I somehow unrolled some giant
> >chain of wtfs. Either I'm completely missing what this is used for or it
> >probably should get reworked asap.
> 
> The CGS functions aren't used at the moment because none of the components
> depending on them made it into the kernel, but we wanted to keep it so that
> we can get reviews on the general idea and if necessary rework it.
> 
> In general it's an abstraction layer of device driver dependent functions
> which enables us to share more code internally.
> 
> We worked quite hard on trying to avoid the OS abstraction trap with this,
> but if you think this still won't work feel free to object.

The bit that made me look really is the import_gpu_mem thing, which seems
to partially reinvent drm_prime.c. Given how tricky importing and
import-caching is I'd really like to see that gone (and Alex said on irc
he'd be ok with that).

The other stuff seems a lot more benign. For the irq abstraction
specifically it might be worth looking at the irq_chip stuff linux core
has, which is what's used to virtualize/abstract irq routing and handling.
But for that stuff it's a balance thing really how much you reinvent
wheels internally in the driver (e.g. i915 has it's own power_well stuff
which is pretty much just powerdomains reinvented, with less features).

But really I can't tell without the users whether I'd expect this to be
hurt longterm or not for you ;-) But the import stuff is hurt for me since
you noodle around in drm internals. And specifically I'd like to make
modern drivers completely struct_mutex free with the goal to untangle the
last hold-outs of that lock in the drm core.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-09-29 15:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 16:21 [PATCH 01/12] drm/amdgpu: add amd_gnb_bus support Alex Deucher
2015-07-09 16:21 ` [PATCH 02/12] drm/amd: Add CGS interfaces Alex Deucher
2015-07-09 16:21 ` [PATCH 03/12] drm/amdgpu: Implement mmio callbacks for CGS Alex Deucher
2015-07-09 16:21 ` [PATCH 04/12] drm/amdgpu: Implement the pciconfig " Alex Deucher
2015-07-09 16:21 ` [PATCH 05/12] drm/amdgpu: Implement irq interfaces " Alex Deucher
2015-07-09 16:21 ` [PATCH 06/12] drm/amdgpu: add atom " Alex Deucher
2015-07-09 16:21 ` [PATCH 07/12] drm/amdgpu: implement cgs gpu memory callbacks Alex Deucher
2015-09-29 11:40   ` Daniel Vetter
2015-09-29 12:39     ` Christian König
2015-09-29 15:20       ` Daniel Vetter [this message]
2015-09-29 15:41         ` Alex Deucher
2015-09-29 20:10           ` Dave Airlie
2015-09-29 20:28             ` Alex Deucher
2015-09-30  6:54               ` Daniel Vetter
2015-09-30  7:36                 ` Christian König
2015-09-30  6:51             ` Daniel Vetter
2015-09-30  6:55           ` Daniel Vetter
2015-07-09 16:21 ` [PATCH 08/12] drm/amd: add ACP 2.x register headers Alex Deucher
2015-07-09 16:21 ` [PATCH 09/12] drm/amd: add ACP driver support (v4) Alex Deucher
2015-07-09 16:21 ` [PATCH 10/12] drm/amd: modify ACP DMA buffer position update logic Alex Deucher
2015-07-09 16:21 ` [PATCH 11/12] drm/amd: add ACP suspend/resume functionality Alex Deucher
2015-07-09 16:21 ` [PATCH 12/12] drm/amd: remove amd gnb bus default runtime pm ops Alex Deucher

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=20150929152009.GO3383@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Maruthi.Bayyavarapu@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.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