mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
drm/etnaviv: fix workaround for GC500
The hardware description macros define the mask and shifts the wrong way around for the intended use, leading to the condition never being true and the chip revision ending up with the wrong value. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
This commit is contained in:
parent
ed94add00e
commit
c33246d793
1 changed files with 5 additions and 2 deletions
|
@ -251,9 +251,12 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu)
|
|||
chipIdentity = gpu_read(gpu, VIVS_HI_CHIP_IDENTITY);
|
||||
|
||||
/* Special case for older graphic cores. */
|
||||
if (VIVS_HI_CHIP_IDENTITY_FAMILY(chipIdentity) == 0x01) {
|
||||
if (((chipIdentity & VIVS_HI_CHIP_IDENTITY_FAMILY__MASK)
|
||||
>> VIVS_HI_CHIP_IDENTITY_FAMILY__SHIFT) == 0x01) {
|
||||
gpu->identity.model = 0x500; /* gc500 */
|
||||
gpu->identity.revision = VIVS_HI_CHIP_IDENTITY_REVISION(chipIdentity);
|
||||
gpu->identity.revision =
|
||||
(chipIdentity & VIVS_HI_CHIP_IDENTITY_REVISION__MASK)
|
||||
>> VIVS_HI_CHIP_IDENTITY_REVISION__SHIFT;
|
||||
} else {
|
||||
|
||||
gpu->identity.model = gpu_read(gpu, VIVS_HI_CHIP_MODEL);
|
||||
|
|
Loading…
Reference in a new issue