[PATCH] radeon: avoid segfault when pixmap exceed GPU capabilities
Jerome Glisse
j.glisse at gmail.com
Thu Nov 15 07:43:38 PST 2012
On Thu, Nov 15, 2012 at 5:04 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On Mit, 2012-11-14 at 12:39 -0500, j.glisse at gmail.com wrote:
>> From: Jerome Glisse <jglisse at redhat.com>
>>
>> We might get a request for a pixmap/drawable that is too big
>> for GPU capabilities in the dri2 get buffer path. In face of
>> such things just return NULL to dri2 get buffer request. The
>> GL driver should then use something like transparent black to
>> avoid something too ugly on the screen.
>>
>> Signed-off-by: Jerome Glisse <jglisse at redhat.com>
>> ---
>> src/radeon_dri2.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
>> index ebd813c..919f1f6 100644
>> --- a/src/radeon_dri2.c
>> +++ b/src/radeon_dri2.c
>> @@ -444,6 +444,10 @@ radeon_dri2_create_buffer2(ScreenPtr pScreen,
>> info->exa_force_create = TRUE;
>> exaMoveInPixmap(pixmap);
>> info->exa_force_create = FALSE;
>> + if (exaGetPixmapDriverPrivate(pixmap) == NULL) {
>> + /* this happen if pixmap is non accelerable */
>> + goto error;
>> + }
>> }
>>
>> if (is_glamor_pixmap)
>
> Does radeon_dri2_create_buffers() need similar treatment? Otherwise
>
> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
>
I was thinking of removing it afaict it only get use on quite old xserver.
Cheers,
Jerome
More information about the xorg-driver-ati
mailing list