From: Christian Gmeiner <christian.gmeiner@gmail.com>
To: l.stach@pengutronix.de
Cc: linux+etnaviv@arm.linux.org.uk, dri-devel@lists.freedesktop.org
Subject: [PATCH 2/2] etnaviv: use stream count from VIVS_HI_CHIP_SPECS_4
Date: Tue, 19 Jan 2016 08:05:10 +0100 [thread overview]
Message-ID: <1453187110-19388-2-git-send-email-christian.gmeiner@gmail.com> (raw)
In-Reply-To: <1453187110-19388-1-git-send-email-christian.gmeiner@gmail.com>
Freescales v5 kernel driver reads stream count from SPECS_4 register
and if that value is 0 it falls back to the value from CHIP_SPECS.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index e4f6008..926e369 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -133,10 +133,17 @@ static void etnaviv_hw_specs(struct etnaviv_gpu *gpu)
specs[0] = gpu_read(gpu, VIVS_HI_CHIP_SPECS);
specs[1] = gpu_read(gpu, VIVS_HI_CHIP_SPECS_2);
specs[2] = gpu_read(gpu, VIVS_HI_CHIP_SPECS_3);
+ specs[3] = gpu_read(gpu, VIVS_HI_CHIP_SPECS_4);
gpu->identity.stream_count =
- (specs[0] & VIVS_HI_CHIP_SPECS_STREAM_COUNT__MASK)
- >> VIVS_HI_CHIP_SPECS_STREAM_COUNT__SHIFT;
+ (specs[3] & VIVS_HI_CHIP_SPECS_4_STREAM_COUNT__MASK)
+ >> VIVS_HI_CHIP_SPECS_4_STREAM_COUNT__SHIFT;
+
+ if (gpu->identity.stream_count == 0)
+ gpu->identity.stream_count =
+ (specs[0] & VIVS_HI_CHIP_SPECS_STREAM_COUNT__MASK)
+ >> VIVS_HI_CHIP_SPECS_STREAM_COUNT__SHIFT;
+
gpu->identity.register_max =
(specs[0] & VIVS_HI_CHIP_SPECS_REGISTER_MAX__MASK)
>> VIVS_HI_CHIP_SPECS_REGISTER_MAX__SHIFT;
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-01-19 7:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 7:05 [PATCH 1/2] etnaviv: add gpu param for number of varyings Christian Gmeiner
2016-01-19 7:05 ` Christian Gmeiner [this message]
2016-01-19 8:13 ` [PATCH 2/2] etnaviv: use stream count from VIVS_HI_CHIP_SPECS_4 Christian Gmeiner
2016-01-19 7:16 ` [PATCH 1/2] etnaviv: add gpu param for number of varyings Ilia Mirkin
2016-01-19 8:11 ` Christian Gmeiner
2016-01-19 8:16 ` Ilia Mirkin
2016-01-19 8:20 ` Lucas Stach
2016-01-19 8:38 ` Christian Gmeiner
2016-01-19 9:18 ` 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=1453187110-19388-2-git-send-email-christian.gmeiner@gmail.com \
--to=christian.gmeiner@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=l.stach@pengutronix.de \
--cc=linux+etnaviv@arm.linux.org.uk \
/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).