ecore_drm2: Move mode_set API out of testing
This commit is contained in:
parent
03901109ff
commit
087665ab83
|
@ -79,8 +79,6 @@ EAPI const Eina_List *ecore_drm2_displays_get(Ecore_Drm2_Device *dev);
|
|||
EAPI void ecore_drm2_display_info_get(Ecore_Drm2_Display *disp, int *x, int *y, int *w, int *h, unsigned int *refresh);
|
||||
EAPI int ecore_drm2_display_rotation_get(Ecore_Drm2_Display *disp);
|
||||
EAPI void ecore_drm2_display_rotation_set(Ecore_Drm2_Display *disp, uint64_t rotation);
|
||||
|
||||
/* XXX: These are 'test' APIs */
|
||||
EAPI void ecore_drm2_display_mode_set(Ecore_Drm2_Display *disp, Ecore_Drm2_Display_Mode *mode, int x, int y);
|
||||
|
||||
# endif
|
||||
|
|
|
@ -612,13 +612,32 @@ ecore_drm2_display_model_get(Ecore_Drm2_Display *disp)
|
|||
}
|
||||
|
||||
EAPI void
|
||||
ecore_drm2_display_mode_set(Ecore_Drm2_Display *disp, Ecore_Drm2_Display_Mode *mode, int x EINA_UNUSED, int y EINA_UNUSED)
|
||||
ecore_drm2_display_mode_set(Ecore_Drm2_Display *disp, Ecore_Drm2_Display_Mode *mode, int x, int y)
|
||||
{
|
||||
Ecore_Drm2_Crtc_State *cstate;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(disp);
|
||||
EINA_SAFETY_ON_NULL_RETURN(mode);
|
||||
EINA_SAFETY_ON_NULL_RETURN(disp->crtc);
|
||||
|
||||
/* TODO, FIXME */
|
||||
if ((disp->state.current->x != x) ||
|
||||
(disp->state.current->y != y))
|
||||
{
|
||||
disp->state.pending->x = x;
|
||||
disp->state.pending->y = y;
|
||||
disp->state.pending->changes |= ECORE_DRM2_DISPLAY_STATE_POSITION;
|
||||
}
|
||||
|
||||
cstate = disp->crtc->state.current;
|
||||
if (cstate->mode != mode)
|
||||
{
|
||||
Ecore_Drm2_Crtc_State *pstate;
|
||||
|
||||
pstate = disp->crtc->state.pending;
|
||||
pstate->mode = mode;
|
||||
pstate->changes |= ECORE_DRM2_CRTC_STATE_MODE;
|
||||
}
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
|
|
|
@ -104,6 +104,7 @@ typedef enum _Ecore_Drm2_Display_State_Changes
|
|||
ECORE_DRM2_DISPLAY_STATE_MODE = (1 << 3),
|
||||
ECORE_DRM2_DISPLAY_STATE_PRIMARY = (1 << 4),
|
||||
ECORE_DRM2_DISPLAY_STATE_ENABLED = (1 << 5),
|
||||
ECORE_DRM2_DISPLAY_STATE_POSITION = (1 << 6),
|
||||
} Ecore_Drm2_Display_State_Changes;
|
||||
|
||||
typedef struct _Ecore_Drm2_Atomic_Blob
|
||||
|
@ -198,6 +199,9 @@ typedef struct _Ecore_Drm2_Plane_State
|
|||
typedef struct _Ecore_Drm2_Display_State
|
||||
{
|
||||
uint32_t changes;
|
||||
|
||||
int x, y;
|
||||
|
||||
uint16_t gamma;
|
||||
uint64_t rotation;
|
||||
double backlight;
|
||||
|
|
Loading…
Reference in New Issue