drm: Check crtc viewport correctly with rotated primary plane on atomic drivers
[firefly-linux-kernel-4.4.55.git] / include / drm / drm_crtc.h
index faaeff7db6847323a19b8112c64a9ccb3fcb5dfc..3f0c6909dda17f9ec14959353a440da171a87ca6 100644 (file)
@@ -86,10 +86,12 @@ static inline uint64_t I642U64(int64_t val)
 }
 
 /* rotation property bits */
+#define DRM_ROTATE_MASK 0x0f
 #define DRM_ROTATE_0   0
 #define DRM_ROTATE_90  1
 #define DRM_ROTATE_180 2
 #define DRM_ROTATE_270 3
+#define DRM_REFLECT_MASK (~DRM_ROTATE_MASK)
 #define DRM_REFLECT_X  4
 #define DRM_REFLECT_Y  5
 
@@ -210,8 +212,6 @@ struct drm_framebuffer {
        int flags;
        uint32_t pixel_format; /* fourcc format */
        struct list_head filp_head;
-       /* if you are using the helper */
-       void *helper_private;
 };
 
 struct drm_property_blob {
@@ -407,17 +407,11 @@ struct drm_crtc_funcs {
  * @enabled: is this CRTC enabled?
  * @mode: current mode timings
  * @hwmode: mode timings as programmed to hw regs
- * @invert_dimensions: for purposes of error checking crtc vs fb sizes,
- *    invert the width/height of the crtc.  This is used if the driver
- *    is performing 90 or 270 degree rotated scanout
  * @x: x position on screen
  * @y: y position on screen
  * @funcs: CRTC control functions
  * @gamma_size: size of gamma ramp
  * @gamma_store: gamma ramp values
- * @framedur_ns: precise frame timing
- * @linedur_ns: precise line timing
- * @pixeldur_ns: precise pixel timing
  * @helper_private: mid-layer private data
  * @properties: property tracking for this CRTC
  * @state: current atomic state for this CRTC
@@ -461,8 +455,6 @@ struct drm_crtc {
         */
        struct drm_display_mode hwmode;
 
-       bool invert_dimensions;
-
        int x, y;
        const struct drm_crtc_funcs *funcs;
 
@@ -470,9 +462,6 @@ struct drm_crtc {
        uint32_t gamma_size;
        uint16_t *gamma_store;
 
-       /* Constants needed for precise vblank and swap timestamping. */
-       int framedur_ns, linedur_ns, pixeldur_ns;
-
        /* if you are using the helper */
        const void *helper_private;
 
@@ -913,7 +902,6 @@ struct drm_bridge_funcs {
  * @next: the next bridge in the encoder chain
  * @of_node: device node pointer to the bridge
  * @list: to keep track of all added bridges
- * @base: base mode object
  * @funcs: control functions
  * @driver_private: pointer to the bridge driver's internal context
  */
@@ -1390,7 +1378,7 @@ extern int drm_property_add_enum(struct drm_property *property, int index,
 extern int drm_mode_create_dvi_i_properties(struct drm_device *dev);
 extern int drm_mode_create_tv_properties(struct drm_device *dev,
                                         unsigned int num_modes,
-                                        char *modes[]);
+                                        const char * const modes[]);
 extern int drm_mode_create_scaling_mode_property(struct drm_device *dev);
 extern int drm_mode_create_aspect_ratio_property(struct drm_device *dev);
 extern int drm_mode_create_dirty_info_property(struct drm_device *dev);