diff options
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drmP.h | 23 | ||||
-rw-r--r-- | include/drm/drm_bridge.h | 22 | ||||
-rw-r--r-- | include/drm/drm_mode_config.h | 8 | ||||
-rw-r--r-- | include/drm/drm_of.h | 8 |
4 files changed, 36 insertions, 25 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index f5099c12c6a6..c5dfbdb7271d 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -97,6 +97,16 @@ struct pci_controller; #define DRM_IF_VERSION(maj, min) (maj << 16 | min) +#define DRM_SWITCH_POWER_ON 0 +#define DRM_SWITCH_POWER_OFF 1 +#define DRM_SWITCH_POWER_CHANGING 2 +#define DRM_SWITCH_POWER_DYNAMIC_OFF 3 + +static inline bool drm_core_check_feature(struct drm_device *dev, int feature) +{ + return dev->driver->driver_features & feature; +} + /** * drm_drv_uses_atomic_modeset - check if the driver implements * atomic_commit() @@ -107,17 +117,8 @@ struct pci_controller; */ static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev) { - return dev->mode_config.funcs->atomic_commit != NULL; -} - -#define DRM_SWITCH_POWER_ON 0 -#define DRM_SWITCH_POWER_OFF 1 -#define DRM_SWITCH_POWER_CHANGING 2 -#define DRM_SWITCH_POWER_DYNAMIC_OFF 3 - -static inline bool drm_core_check_feature(struct drm_device *dev, int feature) -{ - return dev->driver->driver_features & feature; + return drm_core_check_feature(dev, DRIVER_ATOMIC) || + dev->mode_config.funcs->atomic_commit != NULL; } /* returns true if currently okay to sleep */ diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index 70131ab57e8f..bd850747ce54 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -270,27 +270,29 @@ struct drm_bridge_timings { /** * struct drm_bridge - central DRM bridge control structure - * @dev: DRM device this bridge belongs to - * @encoder: encoder to which this bridge is connected - * @next: the next bridge in the encoder chain - * @of_node: device node pointer to the bridge - * @list: to keep track of all added bridges - * @timings: the timing specification for the bridge, if any (may - * be NULL) - * @funcs: control functions - * @driver_private: pointer to the bridge driver's internal context */ struct drm_bridge { + /** @dev: DRM device this bridge belongs to */ struct drm_device *dev; + /** @encoder: encoder to which this bridge is connected */ struct drm_encoder *encoder; + /** @next: the next bridge in the encoder chain */ struct drm_bridge *next; #ifdef CONFIG_OF + /** @of_node: device node pointer to the bridge */ struct device_node *of_node; #endif + /** @list: to keep track of all added bridges */ struct list_head list; + /** + * @timings: + * + * the timing specification for the bridge, if any (may be NULL) + */ const struct drm_bridge_timings *timings; - + /** @funcs: control functions */ const struct drm_bridge_funcs *funcs; + /** @driver_private: pointer to the bridge driver's internal context */ void *driver_private; }; diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h index f4a173c8d79c..a0b202e1d69a 100644 --- a/include/drm/drm_mode_config.h +++ b/include/drm/drm_mode_config.h @@ -329,10 +329,10 @@ struct drm_mode_config_funcs { /** * struct drm_mode_config - Mode configuration control structure - * @min_width: minimum pixel width on this device - * @min_height: minimum pixel height on this device - * @max_width: maximum pixel width on this device - * @max_height: maximum pixel height on this device + * @min_width: minimum fb pixel width on this device + * @min_height: minimum fb pixel height on this device + * @max_width: maximum fb pixel width on this device + * @max_height: maximum fb pixel height on this device * @funcs: core driver provided mode setting functions * @fb_base: base address of the framebuffer * @poll_enabled: track polling support for this device diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index b93c239afb60..ead34ab5ca4e 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -17,6 +17,8 @@ struct drm_bridge; struct device_node; #ifdef CONFIG_OF +uint32_t drm_of_crtc_port_mask(struct drm_device *dev, + struct device_node *port); uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, struct device_node *port); void drm_of_component_match_add(struct device *master, @@ -34,6 +36,12 @@ int drm_of_find_panel_or_bridge(const struct device_node *np, struct drm_panel **panel, struct drm_bridge **bridge); #else +static inline uint32_t drm_of_crtc_port_mask(struct drm_device *dev, + struct device_node *port) +{ + return 0; +} + static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, struct device_node *port) { |