aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_crtc.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 20:36:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 20:36:12 -0400
commita7d7a143d0b4cb1914705884ca5c25e322dba693 (patch)
tree0ee5e9e43f0863b38a29e8abc293e80eab177d74 /include/drm/drm_crtc.h
parent43c40df2c7fedce640a6c39fcdf58764f6bbac5c (diff)
parent7963e9db1b1f842fdc53309baa8714d38e9f5681 (diff)
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull DRM updates from Dave Airlie: "Like all good pull reqs this ends with a revert, so it must mean we tested it, [ Ed. That's _one_ way of looking at it ] This pull is missing nouveau, Ben has been stuck trying to track down a very longstanding bug that revealed itself due to some other changes. I've asked him to send you a direct pull request for nouveau once he cleans things up. I'm away until Monday so don't want to delay things, you can make a decision on that when he sends it, I have my phone so I can ack things just not really merge much. It has one trivial conflict with your tree in armada_drv.c, and also the pull request contains some component changes that are already in your tree, the base tree from Russell went via Greg's tree already, but some stuff still shows up in here that doesn't when I merge my tree into yours. Otherwise all pretty standard graphics fare, one new driver and changes all over the place. New drivers: - sti kms driver for STMicroelectronics chipsets stih416 and stih407. core: - lots of cleanups to the drm core - DP MST helper code merged - universal cursor planes. - render nodes enabled by default panel: - better panel interfaces - new panel support - non-continuous cock advertising ability ttm: - shrinker fixes i915: - hopefully ditched UMS support - runtime pm fixes - psr tracking and locking - now enabled by default - userptr fixes - backlight brightness fixes - MST support merged - runtime PM for dpms - primary planes locking fixes - gen8 hw semaphore support - fbc fixes - runtime PM on SOix sleep state hw. - mmio base page flipping - lots of vlv/chv fixes. - universal cursor planes radeon: - Hawaii fixes - display scalar support for non-fixed mode displays - new firmware format support - dpm on more asics by default - GPUVM improvements - uncached and wc GTT buffers - BOs > visible VRAM exynos: - i80 interface support - module auto-loading - ipp driver consolidated. armada: - irq handling in crtc layer only - crtc renumbering - add component support - DT interaction changes. tegra: - load as module fixes - eDP bpp and sync polarity fixed - DSI non-continuous clock mode support - better support for importing buffers from nouveau msm: - mdp5/adq8084 v1.3 hw enablement - devicetree clk changse - ifc6410 board working tda998x: - component support - DT documentation update vmwgfx: - fix compat shader namespace" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (551 commits) Revert "drm: drop redundant drm_file->is_master" drm/panel: simple: Use devm_gpiod_get_optional() drm/dsi: Replace upcasting macro by function drm/panel: ld9040: Replace upcasting macro by function drm/exynos: dp: Modify driver to support drm_panel drm/exynos: Move DP setup into commit() drm/panel: simple: Add AUO B133HTN01 panel support drm/panel: simple: Support delays in panel functions drm/panel: simple: Add proper definition for prepare and unprepare drm/panel: s6e8aa0: Add proper definition for prepare and unprepare drm/panel: ld9040: Add proper definition for prepare and unprepare drm/tegra: Add support for panel prepare and unprepare routines drm/exynos: dsi: Add support for panel prepare and unprepare routines drm/exynos: dpi: Add support for panel prepare and unprepare routines drm/panel: simple: Add dummy prepare and unprepare routines drm/panel: s6e8aa0: Add dummy prepare and unprepare routines drm/panel: ld9040: Add dummy prepare and unprepare routines drm/panel: Provide convenience wrapper for .get_modes() drm/panel: add .prepare() and .unprepare() functions drm/panel: simple: Remove simple-panel compatible ...
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r--include/drm/drm_crtc.h36
1 files changed, 34 insertions, 2 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 251b75e6bf7a..f1105d0da059 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -41,6 +41,7 @@ struct drm_framebuffer;
41struct drm_object_properties; 41struct drm_object_properties;
42struct drm_file; 42struct drm_file;
43struct drm_clip_rect; 43struct drm_clip_rect;
44struct device_node;
44 45
45#define DRM_MODE_OBJECT_CRTC 0xcccccccc 46#define DRM_MODE_OBJECT_CRTC 0xcccccccc
46#define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0 47#define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0
@@ -75,6 +76,14 @@ static inline uint64_t I642U64(int64_t val)
75 return (uint64_t)*((uint64_t *)&val); 76 return (uint64_t)*((uint64_t *)&val);
76} 77}
77 78
79/* rotation property bits */
80#define DRM_ROTATE_0 0
81#define DRM_ROTATE_90 1
82#define DRM_ROTATE_180 2
83#define DRM_ROTATE_270 3
84#define DRM_REFLECT_X 4
85#define DRM_REFLECT_Y 5
86
78enum drm_connector_force { 87enum drm_connector_force {
79 DRM_FORCE_UNSPECIFIED, 88 DRM_FORCE_UNSPECIFIED,
80 DRM_FORCE_OFF, 89 DRM_FORCE_OFF,
@@ -314,6 +323,7 @@ struct drm_crtc_funcs {
314 */ 323 */
315struct drm_crtc { 324struct drm_crtc {
316 struct drm_device *dev; 325 struct drm_device *dev;
326 struct device_node *port;
317 struct list_head head; 327 struct list_head head;
318 328
319 /** 329 /**
@@ -331,6 +341,10 @@ struct drm_crtc {
331 struct drm_plane *primary; 341 struct drm_plane *primary;
332 struct drm_plane *cursor; 342 struct drm_plane *cursor;
333 343
344 /* position of cursor plane on crtc */
345 int cursor_x;
346 int cursor_y;
347
334 /* Temporary tracking of the old fb while a modeset is ongoing. Used 348 /* Temporary tracking of the old fb while a modeset is ongoing. Used
335 * by drm_mode_set_config_internal to implement correct refcounting. */ 349 * by drm_mode_set_config_internal to implement correct refcounting. */
336 struct drm_framebuffer *old_fb; 350 struct drm_framebuffer *old_fb;
@@ -524,6 +538,8 @@ struct drm_connector {
524 struct drm_property_blob *edid_blob_ptr; 538 struct drm_property_blob *edid_blob_ptr;
525 struct drm_object_properties properties; 539 struct drm_object_properties properties;
526 540
541 struct drm_property_blob *path_blob_ptr;
542
527 uint8_t polled; /* DRM_CONNECTOR_POLL_* */ 543 uint8_t polled; /* DRM_CONNECTOR_POLL_* */
528 544
529 /* requested DPMS state */ 545 /* requested DPMS state */
@@ -533,6 +549,7 @@ struct drm_connector {
533 549
534 /* forced on connector */ 550 /* forced on connector */
535 enum drm_connector_force force; 551 enum drm_connector_force force;
552 bool override_edid;
536 uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; 553 uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER];
537 struct drm_encoder *encoder; /* currently active encoder */ 554 struct drm_encoder *encoder; /* currently active encoder */
538 555
@@ -545,6 +562,8 @@ struct drm_connector {
545 int audio_latency[2]; 562 int audio_latency[2];
546 int null_edid_counter; /* needed to workaround some HW bugs where we get all 0s */ 563 int null_edid_counter; /* needed to workaround some HW bugs where we get all 0s */
547 unsigned bad_edid_counter; 564 unsigned bad_edid_counter;
565
566 struct dentry *debugfs_entry;
548}; 567};
549 568
550/** 569/**
@@ -800,6 +819,7 @@ struct drm_mode_config {
800 struct list_head property_blob_list; 819 struct list_head property_blob_list;
801 struct drm_property *edid_property; 820 struct drm_property *edid_property;
802 struct drm_property *dpms_property; 821 struct drm_property *dpms_property;
822 struct drm_property *path_property;
803 struct drm_property *plane_type_property; 823 struct drm_property *plane_type_property;
804 824
805 /* DVI-I properties */ 825 /* DVI-I properties */
@@ -823,6 +843,7 @@ struct drm_mode_config {
823 843
824 /* Optional properties */ 844 /* Optional properties */
825 struct drm_property *scaling_mode_property; 845 struct drm_property *scaling_mode_property;
846 struct drm_property *aspect_ratio_property;
826 struct drm_property *dirty_info_property; 847 struct drm_property *dirty_info_property;
827 848
828 /* dumb ioctl parameters */ 849 /* dumb ioctl parameters */
@@ -852,7 +873,7 @@ struct drm_prop_enum_list {
852extern int drm_crtc_init_with_planes(struct drm_device *dev, 873extern int drm_crtc_init_with_planes(struct drm_device *dev,
853 struct drm_crtc *crtc, 874 struct drm_crtc *crtc,
854 struct drm_plane *primary, 875 struct drm_plane *primary,
855 void *cursor, 876 struct drm_plane *cursor,
856 const struct drm_crtc_funcs *funcs); 877 const struct drm_crtc_funcs *funcs);
857extern int drm_crtc_init(struct drm_device *dev, 878extern int drm_crtc_init(struct drm_device *dev,
858 struct drm_crtc *crtc, 879 struct drm_crtc *crtc,
@@ -878,6 +899,8 @@ extern int drm_connector_init(struct drm_device *dev,
878 struct drm_connector *connector, 899 struct drm_connector *connector,
879 const struct drm_connector_funcs *funcs, 900 const struct drm_connector_funcs *funcs,
880 int connector_type); 901 int connector_type);
902int drm_connector_register(struct drm_connector *connector);
903void drm_connector_unregister(struct drm_connector *connector);
881 904
882extern void drm_connector_cleanup(struct drm_connector *connector); 905extern void drm_connector_cleanup(struct drm_connector *connector);
883/* helper to unplug all connectors from sysfs for device */ 906/* helper to unplug all connectors from sysfs for device */
@@ -937,6 +960,7 @@ extern const char *drm_get_tv_select_name(int val);
937extern void drm_fb_release(struct drm_file *file_priv); 960extern void drm_fb_release(struct drm_file *file_priv);
938extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); 961extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group);
939extern void drm_mode_group_destroy(struct drm_mode_group *group); 962extern void drm_mode_group_destroy(struct drm_mode_group *group);
963extern void drm_reinit_primary_mode_group(struct drm_device *dev);
940extern bool drm_probe_ddc(struct i2c_adapter *adapter); 964extern bool drm_probe_ddc(struct i2c_adapter *adapter);
941extern struct edid *drm_get_edid(struct drm_connector *connector, 965extern struct edid *drm_get_edid(struct drm_connector *connector,
942 struct i2c_adapter *adapter); 966 struct i2c_adapter *adapter);
@@ -946,6 +970,8 @@ extern void drm_mode_config_init(struct drm_device *dev);
946extern void drm_mode_config_reset(struct drm_device *dev); 970extern void drm_mode_config_reset(struct drm_device *dev);
947extern void drm_mode_config_cleanup(struct drm_device *dev); 971extern void drm_mode_config_cleanup(struct drm_device *dev);
948 972
973extern int drm_mode_connector_set_path_property(struct drm_connector *connector,
974 char *path);
949extern int drm_mode_connector_update_edid_property(struct drm_connector *connector, 975extern int drm_mode_connector_update_edid_property(struct drm_connector *connector,
950 struct edid *edid); 976 struct edid *edid);
951 977
@@ -994,7 +1020,8 @@ extern struct drm_property *drm_property_create_enum(struct drm_device *dev, int
994struct drm_property *drm_property_create_bitmask(struct drm_device *dev, 1020struct drm_property *drm_property_create_bitmask(struct drm_device *dev,
995 int flags, const char *name, 1021 int flags, const char *name,
996 const struct drm_prop_enum_list *props, 1022 const struct drm_prop_enum_list *props,
997 int num_values); 1023 int num_props,
1024 uint64_t supported_bits);
998struct drm_property *drm_property_create_range(struct drm_device *dev, int flags, 1025struct drm_property *drm_property_create_range(struct drm_device *dev, int flags,
999 const char *name, 1026 const char *name,
1000 uint64_t min, uint64_t max); 1027 uint64_t min, uint64_t max);
@@ -1010,6 +1037,7 @@ extern int drm_mode_create_dvi_i_properties(struct drm_device *dev);
1010extern int drm_mode_create_tv_properties(struct drm_device *dev, int num_formats, 1037extern int drm_mode_create_tv_properties(struct drm_device *dev, int num_formats,
1011 char *formats[]); 1038 char *formats[]);
1012extern int drm_mode_create_scaling_mode_property(struct drm_device *dev); 1039extern int drm_mode_create_scaling_mode_property(struct drm_device *dev);
1040extern int drm_mode_create_aspect_ratio_property(struct drm_device *dev);
1013extern int drm_mode_create_dirty_info_property(struct drm_device *dev); 1041extern int drm_mode_create_dirty_info_property(struct drm_device *dev);
1014 1042
1015extern int drm_mode_connector_attach_encoder(struct drm_connector *connector, 1043extern int drm_mode_connector_attach_encoder(struct drm_connector *connector,
@@ -1100,6 +1128,10 @@ extern int drm_format_plane_cpp(uint32_t format, int plane);
1100extern int drm_format_horz_chroma_subsampling(uint32_t format); 1128extern int drm_format_horz_chroma_subsampling(uint32_t format);
1101extern int drm_format_vert_chroma_subsampling(uint32_t format); 1129extern int drm_format_vert_chroma_subsampling(uint32_t format);
1102extern const char *drm_get_format_name(uint32_t format); 1130extern const char *drm_get_format_name(uint32_t format);
1131extern struct drm_property *drm_mode_create_rotation_property(struct drm_device *dev,
1132 unsigned int supported_rotations);
1133extern unsigned int drm_rotation_simplify(unsigned int rotation,
1134 unsigned int supported_rotations);
1103 1135
1104/* Helpers */ 1136/* Helpers */
1105 1137