Subversion Repositories Kolibri OS

Rev

Rev 6082 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6082 Rev 6936
Line 24... Line 24...
24
#ifndef DRM_PLANE_HELPER_H
24
#ifndef DRM_PLANE_HELPER_H
25
#define DRM_PLANE_HELPER_H
25
#define DRM_PLANE_HELPER_H
Line 26... Line 26...
26
 
26
 
27
#include 
27
#include 
-
 
28
#include 
Line 28... Line 29...
28
#include 
29
#include 
29
 
30
 
30
/*
31
/*
31
 * Drivers that don't allow primary plane scaling may pass this macro in place
32
 * Drivers that don't allow primary plane scaling may pass this macro in place
32
 * of the min/max scale parameters of the update checker function.
33
 * of the min/max scale parameters of the update checker function.
33
 *
34
 *
34
 * Due to src being in 16.16 fixed point and dest being in integer pixels,
35
 * Due to src being in 16.16 fixed point and dest being in integer pixels,
35
 * 1<<16 represents no scaling.
36
 * 1<<16 represents no scaling.
Line 36... Line -...
36
 */
-
 
37
#define DRM_PLANE_HELPER_NO_SCALING (1<<16)
-
 
38
 
-
 
39
/**
-
 
40
 * DOC: plane helpers
-
 
41
 *
-
 
42
 * Helper functions to assist with creation and handling of CRTC primary
-
 
43
 * planes.
37
 */
44
 */
38
#define DRM_PLANE_HELPER_NO_SCALING (1<<16)
Line 45... Line -...
45
 
-
 
46
int drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
-
 
47
		  const struct drm_crtc_funcs *funcs);
-
 
48
 
-
 
49
/**
-
 
50
 * drm_plane_helper_funcs - helper operations for CRTCs
-
 
51
 * @prepare_fb: prepare a framebuffer for use by the plane
-
 
52
 * @cleanup_fb: cleanup a framebuffer when it's no longer used by the plane
-
 
53
 * @atomic_check: check that a given atomic state is valid and can be applied
-
 
54
 * @atomic_update: apply an atomic state to the plane (mandatory)
-
 
55
 * @atomic_disable: disable the plane
-
 
56
 *
-
 
57
 * The helper operations are called by the mid-layer CRTC helper.
-
 
58
 */
-
 
59
struct drm_plane_helper_funcs {
-
 
60
	int (*prepare_fb)(struct drm_plane *plane,
-
 
61
			  const struct drm_plane_state *new_state);
-
 
62
	void (*cleanup_fb)(struct drm_plane *plane,
-
 
63
			   const struct drm_plane_state *old_state);
-
 
64
 
-
 
65
	int (*atomic_check)(struct drm_plane *plane,
-
 
66
			    struct drm_plane_state *state);
-
 
67
	void (*atomic_update)(struct drm_plane *plane,
-
 
68
			      struct drm_plane_state *old_state);
-
 
69
	void (*atomic_disable)(struct drm_plane *plane,
-
 
70
			       struct drm_plane_state *old_state);
-
 
71
};
-
 
72
 
-
 
73
static inline void drm_plane_helper_add(struct drm_plane *plane,
-
 
74
					const struct drm_plane_helper_funcs *funcs)
-
 
75
{
39
 
76
	plane->helper_private = funcs;
40
int drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
77
}
41
		  const struct drm_crtc_funcs *funcs);
78
 
42
 
79
int drm_plane_helper_check_update(struct drm_plane *plane,
43
int drm_plane_helper_check_update(struct drm_plane *plane,