[PATCH xserver 7/8] dix: Remove colormap private fixup

Aaron Plattner aplattner at nvidia.com
Wed Jan 31 22:12:02 UTC 2018


On 01/31/2018 12:15 PM, Aaron Plattner wrote:
> On 01/31/2018 07:54 AM, Adam Jackson wrote:
>> The old xfree86 colormap system was the only thing that would register a
>> colormap private after the colormap was created.  Since that's gone now
>> we can remove the special case.
> 
> Our driver does this for some wacky overlay stuff, but I think it's just
> a sequencing quirk that we could fix. I'll look into that today.

It looks like reordering our init code works fine, so
Acked-by: Aaron Plattner <aplattner at nvidia.com>

-- Aaron

> 
>> Signed-off-by: Adam Jackson <ajax at redhat.com>
>> ---
>>  dix/privates.c     | 21 +--------------------
>>  include/privates.h |  2 +-
>>  2 files changed, 2 insertions(+), 21 deletions(-)
>>
>> diff --git a/dix/privates.c b/dix/privates.c
>> index 9ca80f0b6..b28e60fe7 100644
>> --- a/dix/privates.c
>> +++ b/dix/privates.c
>> @@ -91,10 +91,10 @@ static const char *key_names[PRIVATE_LAST] = {
>>      /* These can have objects created before all of the keys are registered */
>>      [PRIVATE_SCREEN] = "SCREEN",
>>      [PRIVATE_EXTENSION] = "EXTENSION",
>> -    [PRIVATE_COLORMAP] = "COLORMAP",
>>      [PRIVATE_DEVICE] = "DEVICE",
>>  
>>      /* These cannot have any objects before all relevant keys are registered */
>> +    [PRIVATE_COLORMAP] = "COLORMAP",
>>      [PRIVATE_CLIENT] = "CLIENT",
>>      [PRIVATE_PROPERTY] = "PROPERTY",
>>      [PRIVATE_SELECTION] = "SELECTION",
>> @@ -250,24 +250,6 @@ fixupExtensions(FixupFunc fixup, unsigned bytes)
>>      return TRUE;
>>  }
>>  
>> -static Bool
>> -fixupDefaultColormaps(FixupFunc fixup, unsigned bytes)
>> -{
>> -    int s;
>> -
>> -    for (s = 0; s < screenInfo.numScreens; s++) {
>> -        ColormapPtr cmap;
>> -
>> -        dixLookupResourceByType((void **) &cmap,
>> -                                screenInfo.screens[s]->defColormap, RT_COLORMAP,
>> -                                serverClient, DixCreateAccess);
>> -        if (cmap &&
>> -            !fixup(&cmap->devPrivates, screenInfo.screens[s]->screenSpecificPrivates[PRIVATE_COLORMAP].offset, bytes))
>> -            return FALSE;
>> -    }
>> -    return TRUE;
>> -}
>> -
>>  static Bool
>>  fixupDeviceList(DeviceIntPtr device, FixupFunc fixup, unsigned bytes)
>>  {
>> @@ -290,7 +272,6 @@ static Bool (*const allocated_early[PRIVATE_LAST]) (FixupFunc, unsigned) = {
>>      [PRIVATE_SCREEN] = fixupScreens,
>>      [PRIVATE_CLIENT] = fixupServerClient,
>>      [PRIVATE_EXTENSION] = fixupExtensions,
>> -    [PRIVATE_COLORMAP] = fixupDefaultColormaps,
>>      [PRIVATE_DEVICE] = fixupDevices,
>>  };
>>  
>> diff --git a/include/privates.h b/include/privates.h
>> index e89c3e440..bbd8c3355 100644
>> --- a/include/privates.h
>> +++ b/include/privates.h
>> @@ -32,10 +32,10 @@ typedef enum {
>>      /* These can have objects created before all of the keys are registered */
>>      PRIVATE_SCREEN,
>>      PRIVATE_EXTENSION,
>> -    PRIVATE_COLORMAP,
>>      PRIVATE_DEVICE,
>>  
>>      /* These cannot have any objects before all relevant keys are registered */
>> +    PRIVATE_COLORMAP,
>>      PRIVATE_CLIENT,
>>      PRIVATE_PROPERTY,
>>      PRIVATE_SELECTION,
>>
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
> 



More information about the xorg-devel mailing list