[PATCH 1/2] Revert "drm: Add and handle new aspect ratios in DRM layer"

Alex Deucher alexdeucher at gmail.com
Fri Nov 11 17:07:29 UTC 2016


On Fri, Nov 11, 2016 at 12:00 PM, Ville Syrjälä
<ville.syrjala at linux.intel.com> wrote:
> On Thu, Nov 03, 2016 at 02:31:43PM +0200, ville.syrjala at linux.intel.com wrote:
>> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>>
>> This reverts commit a68362fe3e84fcbedd49939aa200519aa5410135.
>>
>> Adding new mode flags willy nilly breaks existing userspace. We need to
>> coordinate this better, potentially with a new client cap that only
>> exposes the aspect ratio flags when userspace is prepared for them
>> (similar to what we do with stereo 3D modes).
>
> As a demonstration here's the change in the xrandr mode list after doing
> the revert:
>
>  HDMI2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 700mm x 390mm
> -   1920x1080     60.00*+
> -   1920x1080i    60.00    50.00
> +   1920x1080     60.00*+  50.00    59.94    30.00    25.00    24.00    29.97    23.98
> +   1920x1080i    60.00    50.00    59.94
>     1600x1200     60.00
>     1680x1050     59.88
>     1280x1024     75.02    60.02
> @@ -13,30 +13,29 @@
>     1360x768      60.02
>     1280x800      59.91
>     1152x864      75.00
> -   1280x720      60.00    50.00
> +   1280x720      60.00    50.00    59.94
>     1024x768      75.03    70.07    60.00
>     832x624       74.55
>     800x600       72.19    75.00    60.32
> -   640x480       75.00    72.81    66.67    59.94
> +   720x576       50.00
> +   720x480       60.00    59.94
> +   640x480       75.00    72.81    66.67    60.00    59.94
>     720x400       70.08
>
> This was with sna, which does this:
>  #define KNOWN_MODE_FLAGS ((1<<14)-1)
>  if (mode->status == MODE_OK && kmode->flags & ~KNOWN_MODE_FLAGS)
>         mode->status = MODE_BAD; /* unknown flags => unhandled */
> so all the modes with an aspect ratio just vanished.
>
> -modesetting and -ati on the other hand just copy over the unknown
> bits into the xrandr mode structure, which sounds dubious at best:
>  mode->Flags = kmode->flags; //& FLAG_BITS;
> I've not checked what damage it can actually cause.

What problems could this cause?  Presumably the kernel driver has
validated the modes already or they wouldn't showing up in the first
place.  Or is your concern that something in the xserver itself may
barf on the new flags?

Alex


More information about the dri-devel mailing list