From: Christian Gmeiner <christian.gmeiner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Cc: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
DRI mailing list
<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/2] drm: etnaviv: add further minor features and varyings count
Date: Wed, 20 Jan 2016 19:01:36 +0100 [thread overview]
Message-ID: <CAH9NwWdcxEofKYcsSc6SvEW0ag=OHhqH=AYOBOPcsbGSk_DoXw@mail.gmail.com> (raw)
In-Reply-To: <20160119102103.GK19062-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
Hi Russell
2016-01-19 11:21 GMT+01:00 Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>:
> On Tue, Jan 19, 2016 at 11:09:57AM +0100, Christian Gmeiner wrote:
>> Hi Russell,
>>
>> 2016-01-19 10:18 GMT+01:00 Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>:
>> > + /*
>> > + * For some cores, two varyings are consumed for position, so the
>> > + * maximum varying count needs to be reduced by one.
>> > + */
>> > + if ((gpu->identity.model == chipModel_GC2000 &&
>> > + gpu->identity.revision == 0x5108) ||
>> > + (gpu->identity.model == chipModel_GC880 &&
>> > + gpu->identity.revision == 0x5106))
>> > + gpu->identity.varyings_count -= 1;
>>
>> Should we not include the whole list of GPU cores with that special handling?
>> See: https://github.com/Freescale/kernel-module-imx-gpu-viv/blob/master/kernel-module-imx-gpu-viv-src/hal/kernel/arch/gc_hal_kernel_hardware.c#L592
>
> I was debating about that - but I think we need to come up with a better
> way to do this sort of thing. At the very least, I've been wondering
> whether a macro such as:
>
> #define etnaviv_model_rev(gpu, mod, rev) \
> ((gpu)->identity.model == chipModel_##mod && \
> (gpu)->identity.revision == rev))
>
> would help make some of this code more readable.
>
Yep that makes the code more readable.
> The other thing I've been wondering is whether a table looked up by GPU
> model ID and/or revision ID quirks would simplify this. However, the
> downside with the tabular approach is that it becomes harder to compare
> what we have against the galcore sources.
>
The table driven approach could be a little heavy for the number of
quirks we have
currently. Maybe Lucas has an opinion about that?
greets
--
Christian Gmeiner, MSc
https://soundcloud.com/christian-gmeiner
next prev parent reply other threads:[~2016-01-20 18:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 9:18 [PATCH 2/2] drm: etnaviv: add further minor features and varyings count Russell King
[not found] ` <E1aLSQq-0006sU-Ou-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2016-01-19 10:09 ` Christian Gmeiner
2016-01-19 10:21 ` Russell King - ARM Linux
[not found] ` <20160119102103.GK19062-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2016-01-20 18:01 ` Christian Gmeiner [this message]
2016-01-21 9:13 ` Lucas Stach
2016-01-21 9:16 ` Lucas Stach
[not found] ` <1453367790.3183.14.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-01-21 11:34 ` Christian Gmeiner
[not found] ` <CAH9NwWc7vp3C5Ww7LzQ0p6pWxk-ZefV0bW-YbMSdnoTXDr0Tkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-21 11:45 ` Russell King - ARM Linux
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='CAH9NwWdcxEofKYcsSc6SvEW0ag=OHhqH=AYOBOPcsbGSk_DoXw@mail.gmail.com' \
--to=christian.gmeiner-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.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).