dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Qiang Yu <yuq825@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: "Marek Vasut" <marex@denx.de>,
	"Simon Shields" <simon@lineageos.org>,
	lima@lists.freedesktop.org,
	"Neil Armstrong" <narmstrong@baylibre.com>,
	"Maxime Ripard" <maxime.ripard@bootlin.com>,
	"Christian König" <ckoenig.leichtzumerken@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Vasily Khoruzhick" <anarsoul@gmail.com>,
	"David Airlie" <airlied@linux.ie>, "Sean Paul" <sean@poorly.run>,
	"Andreas Baierl" <ichgeh@imkreisrum.de>,
	"Erico Nunes" <nunes.erico@gmail.com>
Subject: Re: [PATCH v3 2/2] drm/lima: driver for ARM Mali4xx GPUs
Date: Tue, 5 Mar 2019 09:36:18 +0800	[thread overview]
Message-ID: <CAKGbVbutBojVtxu3m0jOsOr1pe_1k2-FV2P8N1kzN6xdNLbxhw@mail.gmail.com> (raw)
In-Reply-To: <CAL_JsqLat-Q99e0HEu38TJ7T6iVVMq9GXLJU0yuqe+PfDOBXLQ@mail.gmail.com>

On Tue, Mar 5, 2019 at 1:20 AM Rob Herring <robh@kernel.org> wrote:
>
> On Sat, Mar 2, 2019 at 12:23 PM Rob Clark <robdclark@gmail.com> wrote:
> >
> > On Fri, Mar 1, 2019 at 9:32 PM Qiang Yu <yuq825@gmail.com> wrote:
> > >
> > > On Thu, Feb 28, 2019 at 5:41 AM Rob Herring <robh@kernel.org> wrote:
> > > >
> > > > On Wed, Feb 27, 2019 at 7:42 AM Qiang Yu <yuq825@gmail.com> wrote:
> > > > > diff --git a/drivers/gpu/drm/lima/lima_drv.c b/drivers/gpu/drm/lima/lima_drv.c> > > new file mode 100644
> > > > > index 000000000000..e93bce16ee10
> > > > > --- /dev/null
> > > > > +++ b/drivers/gpu/drm/lima/lima_drv.c
> > > > > @@ -0,0 +1,353 @@
> > > > > +// SPDX-License-Identifier: GPL-2.0 OR MIT
> > > > > +/* Copyright 2017-2018 Qiang Yu <yuq825@gmail.com> */
> > > > > +
> > > > > +#include <linux/module.h>
> > > > > +#include <linux/of_platform.h>
> > > > > +#include <linux/log2.h>
> > > > > +#include <drm/drm_prime.h>
> > > > > +#include <drm/lima_drm.h>
> > > > > +
> > > > > +#include "lima_drv.h"
> > > > > +#include "lima_gem.h"
> > > > > +#include "lima_gem_prime.h"
> > > > > +#include "lima_vm.h"
> > > > > +
> > > > > +int lima_sched_timeout_ms = 0;
> > > > > +int lima_sched_max_tasks = 32;
> > > > > +
> > > > > +MODULE_PARM_DESC(sched_timeout_ms, "task run timeout in ms (0 = no timeout (default))");
> > > > > +module_param_named(sched_timeout_ms, lima_sched_timeout_ms, int, 0444);
> > > > > +
> > > > > +MODULE_PARM_DESC(sched_max_tasks, "max queued task num in a context (default 32)");
> > > > > +module_param_named(sched_max_tasks, lima_sched_max_tasks, int, 0444);
> > > > > +
> > > > > +static int lima_ioctl_info(struct drm_device *dev, void *data, struct drm_file *file)
> > > > > +{
> > > >
> > > > For panfrost, we generalized this to "get param" like other drivers.
> > > > Looks like you can only add 7 more items.
> > > >
> > > > What about GPU revisions?
> > >
> > > Currently I don't know there's any programming difference between GPUs
> > > with different revision. Would be appreciate if anyone can tell me before
> > > some hard reverse engineering effort.
>
> What does the vendor kernel driver have? I haven't checked utgard, but
> there's no shortage of quirks in the midgard/bifrost driver. I'd
> imagine utgard to be similar.

Vendor kernel driver will export the version. I've added it in the following
version of the patch.

>
> > Probably a safe bet there are some revisions that need userspace
> > workarounds.. and given that kernel to userspace uabi is something we
> > end up having to live with for a long time, better to expose more
> > information to userspace just in case.
>
> Right.
>
> More importantly than the 1 example I gave, design the ABI to be
> extendable beyond 7 more u32 values. It is quite easy to support 2^32
> params.
>
OK, I've changed to this way in latter version of this patch.

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

  reply	other threads:[~2019-03-05  1:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 13:41 [PATCH v3 2/2] drm/lima: driver for ARM Mali4xx GPUs Qiang Yu
2019-02-27 20:29 ` Sam Ravnborg
2019-02-27 21:41 ` Rob Herring
2019-03-02  2:32   ` Qiang Yu
2019-03-02 18:23     ` Rob Clark
2019-03-04 17:20       ` Rob Herring
2019-03-05  1:36         ` Qiang Yu [this message]
2019-03-02  5:22   ` Qiang Yu
2019-03-05 15:31     ` Rob Herring
2019-03-05 20:18       ` Eric Anholt
2019-03-06  2:01         ` Qiang Yu

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=CAKGbVbutBojVtxu3m0jOsOr1pe_1k2-FV2P8N1kzN6xdNLbxhw@mail.gmail.com \
    --to=yuq825@gmail.com \
    --cc=airlied@linux.ie \
    --cc=anarsoul@gmail.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ichgeh@imkreisrum.de \
    --cc=lima@lists.freedesktop.org \
    --cc=marex@denx.de \
    --cc=maxime.ripard@bootlin.com \
    --cc=narmstrong@baylibre.com \
    --cc=nunes.erico@gmail.com \
    --cc=robh@kernel.org \
    --cc=sean@poorly.run \
    --cc=simon@lineageos.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;
as well as URLs for NNTP newsgroup(s).