[PATCH] radeon: enable hawaii accel conditionally (v2)
Michel Dänzer
michel at daenzer.net
Tue Jul 29 18:47:01 PDT 2014
On 29.07.2014 23:34, Alex Deucher wrote:
> Only if the kernel has the new CP firmware.
>
> v2: check value of ACCEL_WORKING2
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/radeon_kms.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/radeon_kms.c b/src/radeon_kms.c
> index 707d0c7..c4cf876 100644
> --- a/src/radeon_kms.c
> +++ b/src/radeon_kms.c
> @@ -400,8 +400,12 @@ static Bool RADEONIsAccelWorking(ScrnInfoPtr pScrn)
> }
> return FALSE;
> }
> - if (tmp)
> + if (info->ChipFamily == CHIP_FAMILY_HAWAII) {
> + if (tmp == 2)
> + return TRUE;
I think this should be
if (tmp >= 2)
or we can't use ACCEL_WORKING2 for any more such cases.
> + } else if (tmp) {
> return TRUE;
> + }
> return FALSE;
> }
>
> @@ -499,8 +503,7 @@ static Bool RADEONPreInitAccel_KMS(ScrnInfoPtr pScrn)
> info->is_fast_fb = TRUE;
> }
>
> - if (!xf86ReturnOptValBool(info->Options, OPTION_ACCEL,
> - info->ChipFamily != CHIP_FAMILY_HAWAII) ||
> + if (!xf86ReturnOptValBool(info->Options, OPTION_ACCEL, TRUE) ||
> (!RADEONIsAccelWorking(pScrn))) {
> xf86DrvMsg(pScrn->scrnIndex, X_INFO,
> "GPU accel disabled or not working, using shadowfb for KMS\n");
>
Looks good to me other than that.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the xorg-driver-ati
mailing list