[PATCH] Don't advertise any PRIME offloading capabilities without acceleration
Alex Deucher
alexdeucher at gmail.com
Fri Nov 20 08:02:01 PST 2015
On Fri, Nov 20, 2015 at 4:49 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Acceleration is required even for display offloading. Trying to enable
> display offloading without acceleration resulted in a crash.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
I thought we had fixed this before. Maybe I was thinking of something else.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/radeon_kms.c | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/src/radeon_kms.c b/src/radeon_kms.c
> index 49b922d..8f84df2 100644
> --- a/src/radeon_kms.c
> +++ b/src/radeon_kms.c
> @@ -1017,18 +1017,17 @@ static void RADEONSetupCapabilities(ScrnInfoPtr pScrn)
> int ret;
>
> pScrn->capabilities = 0;
> +
> + /* PRIME offloading requires acceleration */
> + if (info->r600_shadow_fb)
> + return;
> +
> ret = drmGetCap(info->dri2.drm_fd, DRM_CAP_PRIME, &value);
> if (ret == 0) {
> - if (value & DRM_PRIME_CAP_EXPORT) {
> - pScrn->capabilities |= RR_Capability_SourceOutput;
> - if (!info->r600_shadow_fb && info->dri2.available)
> - pScrn->capabilities |= RR_Capability_SinkOffload;
> - }
> - if (value & DRM_PRIME_CAP_IMPORT) {
> - pScrn->capabilities |= RR_Capability_SinkOutput;
> - if (!info->r600_shadow_fb && info->dri2.available)
> - pScrn->capabilities |= RR_Capability_SourceOffload;
> - }
> + if (value & DRM_PRIME_CAP_EXPORT)
> + pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SinkOffload;
> + if (value & DRM_PRIME_CAP_IMPORT)
> + pScrn->capabilities |= RR_Capability_SinkOutput | RR_Capability_SourceOffload;
> }
> #endif
> }
> --
> 2.6.2
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati
More information about the xorg-driver-ati
mailing list