[PATCH] drm/radeon: fix r1xx/r2xx register checker for POT textures

Michel Dänzer michel at daenzer.net
Tue Dec 3 17:12:33 UTC 2019


On 2019-11-26 3:43 p.m., Alex Deucher wrote:
> Shift and mask were reversed.  Noticed by chance.
> 
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/radeon/r100.c | 4 ++--
>  drivers/gpu/drm/radeon/r200.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
> index 7089dfc8c2a9..1ccee4e5880e 100644
> --- a/drivers/gpu/drm/radeon/r100.c
> +++ b/drivers/gpu/drm/radeon/r100.c
> @@ -1826,8 +1826,8 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
>  			track->textures[i].use_pitch = 1;
>  		} else {
>  			track->textures[i].use_pitch = 0;
> -			track->textures[i].width = 1 << ((idx_value >> RADEON_TXFORMAT_WIDTH_SHIFT) & RADEON_TXFORMAT_WIDTH_MASK);
> -			track->textures[i].height = 1 << ((idx_value >> RADEON_TXFORMAT_HEIGHT_SHIFT) & RADEON_TXFORMAT_HEIGHT_MASK);
> +						track->textures[i].width = 1 << ((idx_value & RADEON_TXFORMAT_WIDTH_MASK) >> RADEON_TXFORMAT_WIDTH_SHIFT);

Indentation looks off for this line. With that fixed,

Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>


-- 
Earthling Michel Dänzer               |               https://redhat.com
Libre software enthusiast             |             Mesa and X developer


More information about the dri-devel mailing list