[PATCH 6/6] drm: Add DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags

Michel Dänzer michel at daenzer.net
Mon Aug 8 06:53:22 UTC 2016


On 04.08.2016 19:56, Daniel Vetter wrote:
> On Thu, Aug 04, 2016 at 12:39:41PM +0900, Michel Dänzer wrote:
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> @@ -543,15 +549,25 @@ struct drm_color_lut {
>>   * 'as soon as possible', meaning that it not delay waiting for vblank.
>>   * This may cause tearing on the screen.
>>   *
>> - * The reserved field must be zero until we figure out something
>> - * clever to use it for.
>> + * The sequence field must be zero unless either of the
>> + * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is specified. When
>> + * the ABSOLUTE flag is specified, the sequence field denotes the absolute
>> + * vblank sequence when the flip should take effect. When the RELATIVE
>> + * flag is specified, the sequence field denotes the relative (to the
>> + * current one when the ioctl is called) vblank sequence when the flip
>> + * should take effect. NOTE: DRM_IOCTL_WAIT_VBLANK must still be used to
>> + * make sure the vblank sequence before the target one has passed before
>> + * calling this ioctl. The purpose of the
>> + * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is merely to clarify
>> + * the target for when code dealing with a page flip runs during a
>> + * vertical blank period.
>>   */
>>  
>>  struct drm_mode_crtc_page_flip {
>>  	__u32 crtc_id;
>>  	__u32 fb_id;
>>  	__u32 flags;
>> -	__u32 reserved;
>> +	__u32 sequence;
> 
> Might break abi somewhere. I think it'd be better to create a
> struct drm_mode_crtc_page_flip2 with the renamed field.

It doesn't break ABI. I guess you mean there might be userspace code
referencing the reserved field? Such code would have to be open-coding
drmModePageFlip instead of using it. And it turns out you're right, e.g.
SNA actually does that and would fail to compile... Will be fixed in v2.


> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

Thanks! Will it be okay to merge this via Alex's tree?


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list