Skip to content

Commit

Permalink
drm/file: use explicit values for enum drm_minor_type
Browse files Browse the repository at this point in the history
This makes it clearer that the values cannot be changed because
they are ABI.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by:James Zhu <James.Zhu@amd.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Christian König <christian.koenig@amd.com>
Cc: Marek Olšák <marek.olsak@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20230714104557.518457-2-contact@emersion.fr
  • Loading branch information
Simon Ser committed Jul 17, 2023
1 parent e48aedf commit 03fad56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/drm/drm_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ struct file;
* header include loops we need it here for now.
*/

/* Note that the order of this enum is ABI (it determines
/* Note that the values of this enum are ABI (it determines
* /dev/dri/renderD* numbers).
*
* Setting DRM_MINOR_ACCEL to 32 gives enough space for more drm minors to
* be implemented before we hit any future
*/
enum drm_minor_type {
DRM_MINOR_PRIMARY,
DRM_MINOR_CONTROL,
DRM_MINOR_RENDER,
DRM_MINOR_PRIMARY = 0,
DRM_MINOR_CONTROL = 1,
DRM_MINOR_RENDER = 2,
DRM_MINOR_ACCEL = 32,
};

Expand Down

0 comments on commit 03fad56

Please sign in to comment.