[PATCH RFC 067/111] staging: etnaviv: use definitions for constants

Lucas Stach l.stach at pengutronix.de
Thu Apr 2 08:30:09 PDT 2015


From: Russell King <rmk+kernel at arm.linux.org.uk>

Use the etnaviv definitions for feature constants, rather than BIT()s.

Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
---
 drivers/staging/etnaviv/etnaviv_gpu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etnaviv/etnaviv_gpu.c
index 30abf443f2c9..0e230b220f15 100644
--- a/drivers/staging/etnaviv/etnaviv_gpu.c
+++ b/drivers/staging/etnaviv/etnaviv_gpu.c
@@ -253,7 +253,7 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu)
 
 	/* Disable fast clear on GC700. */
 	if (gpu->identity.model == 0x700)
-		gpu->identity.features &= ~BIT(0);
+		gpu->identity.features &= ~chipFeatures_FAST_CLEAR;
 
 	if ((gpu->identity.model == 0x500 && gpu->identity.revision < 2) ||
 	    (gpu->identity.model == 0x300 && gpu->identity.revision < 0x2000)) {
@@ -270,7 +270,8 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu)
 		gpu->identity.minor_features0 =
 				gpu_read(gpu, VIVS_HI_CHIP_MINOR_FEATURE_0);
 
-	if (gpu->identity.minor_features0 & BIT(21)) {
+	if (gpu->identity.minor_features0 &
+	    chipMinorFeatures0_MORE_MINOR_FEATURES) {
 		gpu->identity.minor_features1 =
 				gpu_read(gpu, VIVS_HI_CHIP_MINOR_FEATURE_1);
 		gpu->identity.minor_features2 =
-- 
2.1.4



More information about the dri-devel mailing list