drm/state-propose: Add an invalid state

We're going to add a way to reuse state, but we don't currently have a way
to represent invalid state - such as before we've ever commit any state
at all.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2025-12-02 13:29:03 -06:00
parent aefdbb0278
commit eda7e524fd
2 changed files with 2 additions and 0 deletions

View file

@ -337,6 +337,7 @@ struct drm_pending_state {
};
enum drm_output_propose_state_mode {
DRM_OUTPUT_PROPOSE_STATE_INVALID = 0, /**< Invalid state */
DRM_OUTPUT_PROPOSE_STATE_MIXED, /**< mix renderer & planes */
DRM_OUTPUT_PROPOSE_STATE_RENDERER_AND_CURSOR, /**< only assign to renderer & cursor plane */
DRM_OUTPUT_PROPOSE_STATE_RENDERER_ONLY, /**< only assign to renderer */

View file

@ -46,6 +46,7 @@
#include "shared/weston-assert.h"
static const char *const drm_output_propose_state_mode_as_string[] = {
[DRM_OUTPUT_PROPOSE_STATE_INVALID] = "invalid(uninitialized) state",
[DRM_OUTPUT_PROPOSE_STATE_MIXED] = "mixed state",
[DRM_OUTPUT_PROPOSE_STATE_RENDERER_AND_CURSOR] = "renderer-and-cursor state",
[DRM_OUTPUT_PROPOSE_STATE_RENDERER_ONLY] = "renderer-only state",