diff options
| author | Dave Airlie <airlied@redhat.com> | 2018-07-18 15:13:14 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2018-07-18 15:27:57 -0400 |
| commit | 54c88a029a0a86fe00a0ee7d2a15ee08e6d04db9 (patch) | |
| tree | 57c28532f31aa88b452bc2cf947dbe4e0b1f9ddb /include/drm | |
| parent | b861686b18538eaaf3530255eb37b4133146fbe2 (diff) | |
| parent | ae61f61fa802c829fa8d505587f9b337e63ea586 (diff) | |
Merge tag 'drm-misc-next-2018-07-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 4.19:
Cross-subsystem Changes:
- many dt-bindings Doc changes
Core Changes:
- Encoder clean ups (Ville Syrjälä)
- Connector Writeback improvements(Boris Brezillon)
- Fake vblank support (Boris Brezillon)
- API for in-kernel clients (Noralf Trønnes)
- improvements to the path of finding panels(Boris Brezillon)
Driver Changes:
- initial support for the virtual display driver - vkms(Haneen Mohammed and Rodrigo Siqueira)
- panel: add Rocktech RK070ER9427 LCD support (Jagan Teki)
- panel: add support for the EDT ETM0700G0EDH6 and EDT ETM0700G0BDH6(Jan Tuerk)
- panel: add DLC DLC0700YZG-1 (Philipp Zabel)
- panel: add support for BOE HV070WSA-100 (Andrzej Hajda)
- panel: add newhaven, nhd-4.3-480272ef-atxl LCD (Tomi Valkeinen)
- panel: add support for Innolux G070Y2-L01 (Christoph Fritz)
- panel: add support for DataImage SCF0700C48GGU18 (Michal Vokáč)
- panel: add support for Sharp LQ035Q7DB03 (Vladimir Zapolskiy)
- panel: p079zca: Refactor panel driver to support multiple panels (Lin Huang)
- sun4i: Add R40 display engine compatible(Jernej Skrabec)
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712011137.GA26620@juma
Diffstat (limited to 'include/drm')
| -rw-r--r-- | include/drm/drm_atomic_helper.h | 1 | ||||
| -rw-r--r-- | include/drm/drm_client.h | 139 | ||||
| -rw-r--r-- | include/drm/drm_connector.h | 20 | ||||
| -rw-r--r-- | include/drm/drm_crtc.h | 23 | ||||
| -rw-r--r-- | include/drm/drm_debugfs_crc.h | 3 | ||||
| -rw-r--r-- | include/drm/drm_device.h | 21 | ||||
| -rw-r--r-- | include/drm/drm_fb_cma_helper.h | 6 | ||||
| -rw-r--r-- | include/drm/drm_fb_helper.h | 38 | ||||
| -rw-r--r-- | include/drm/drm_modeset_helper_vtables.h | 6 | ||||
| -rw-r--r-- | include/drm/drm_panel.h | 2 | ||||
| -rw-r--r-- | include/drm/drm_writeback.h | 6 | ||||
| -rw-r--r-- | include/drm/tinydrm/tinydrm.h | 23 |
12 files changed, 275 insertions, 13 deletions
diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h index 26aaba58d6ce..99e2a5297c69 100644 --- a/include/drm/drm_atomic_helper.h +++ b/include/drm/drm_atomic_helper.h | |||
| @@ -100,6 +100,7 @@ int __must_check drm_atomic_helper_swap_state(struct drm_atomic_state *state, | |||
| 100 | int drm_atomic_helper_setup_commit(struct drm_atomic_state *state, | 100 | int drm_atomic_helper_setup_commit(struct drm_atomic_state *state, |
| 101 | bool nonblock); | 101 | bool nonblock); |
| 102 | void drm_atomic_helper_wait_for_dependencies(struct drm_atomic_state *state); | 102 | void drm_atomic_helper_wait_for_dependencies(struct drm_atomic_state *state); |
| 103 | void drm_atomic_helper_fake_vblank(struct drm_atomic_state *state); | ||
| 103 | void drm_atomic_helper_commit_hw_done(struct drm_atomic_state *state); | 104 | void drm_atomic_helper_commit_hw_done(struct drm_atomic_state *state); |
| 104 | void drm_atomic_helper_commit_cleanup_done(struct drm_atomic_state *state); | 105 | void drm_atomic_helper_commit_cleanup_done(struct drm_atomic_state *state); |
| 105 | 106 | ||
diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h new file mode 100644 index 000000000000..989f8e52864d --- /dev/null +++ b/include/drm/drm_client.h | |||
| @@ -0,0 +1,139 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | |||
| 3 | #ifndef _DRM_CLIENT_H_ | ||
| 4 | #define _DRM_CLIENT_H_ | ||
| 5 | |||
| 6 | #include <linux/types.h> | ||
| 7 | |||
| 8 | struct drm_client_dev; | ||
| 9 | struct drm_device; | ||
| 10 | struct drm_file; | ||
| 11 | struct drm_framebuffer; | ||
| 12 | struct drm_gem_object; | ||
| 13 | struct drm_minor; | ||
| 14 | struct module; | ||
| 15 | |||
| 16 | /** | ||
| 17 | * struct drm_client_funcs - DRM client callbacks | ||
| 18 | */ | ||
| 19 | struct drm_client_funcs { | ||
| 20 | /** | ||
| 21 | * @owner: The module owner | ||
| 22 | */ | ||
| 23 | struct module *owner; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * @unregister: | ||
| 27 | * | ||
| 28 | * Called when &drm_device is unregistered. The client should respond by | ||
| 29 | * releasing it's resources using drm_client_release(). | ||
| 30 | * | ||
| 31 | * This callback is optional. | ||
| 32 | */ | ||
| 33 | void (*unregister)(struct drm_client_dev *client); | ||
| 34 | |||
| 35 | /** | ||
| 36 | * @restore: | ||
| 37 | * | ||
| 38 | * Called on drm_lastclose(). The first client instance in the list that | ||
| 39 | * returns zero gets the privilege to restore and no more clients are | ||
| 40 | * called. This callback is not called after @unregister has been called. | ||
| 41 | * | ||
| 42 | * This callback is optional. | ||
| 43 | */ | ||
| 44 | int (*restore)(struct drm_client_dev *client); | ||
| 45 | |||
| 46 | /** | ||
| 47 | * @hotplug: | ||
| 48 | * | ||
| 49 | * Called on drm_kms_helper_hotplug_event(). | ||
| 50 | * This callback is not called after @unregister has been called. | ||
| 51 | * | ||
| 52 | * This callback is optional. | ||
| 53 | */ | ||
| 54 | int (*hotplug)(struct drm_client_dev *client); | ||
| 55 | }; | ||
| 56 | |||
| 57 | /** | ||
| 58 | * struct drm_client_dev - DRM client instance | ||
| 59 | */ | ||
| 60 | struct drm_client_dev { | ||
| 61 | /** | ||
| 62 | * @dev: DRM device | ||
| 63 | */ | ||
| 64 | struct drm_device *dev; | ||
| 65 | |||
| 66 | /** | ||
| 67 | * @name: Name of the client. | ||
| 68 | */ | ||
| 69 | const char *name; | ||
| 70 | |||
| 71 | /** | ||
| 72 | * @list: | ||
| 73 | * | ||
| 74 | * List of all clients of a DRM device, linked into | ||
| 75 | * &drm_device.clientlist. Protected by &drm_device.clientlist_mutex. | ||
| 76 | */ | ||
| 77 | struct list_head list; | ||
| 78 | |||
| 79 | /** | ||
| 80 | * @funcs: DRM client functions (optional) | ||
| 81 | */ | ||
| 82 | const struct drm_client_funcs *funcs; | ||
| 83 | |||
| 84 | /** | ||
| 85 | * @file: DRM file | ||
| 86 | */ | ||
| 87 | struct drm_file *file; | ||
| 88 | }; | ||
| 89 | |||
| 90 | int drm_client_new(struct drm_device *dev, struct drm_client_dev *client, | ||
| 91 | const char *name, const struct drm_client_funcs *funcs); | ||
| 92 | void drm_client_release(struct drm_client_dev *client); | ||
| 93 | |||
| 94 | void drm_client_dev_unregister(struct drm_device *dev); | ||
| 95 | void drm_client_dev_hotplug(struct drm_device *dev); | ||
| 96 | void drm_client_dev_restore(struct drm_device *dev); | ||
| 97 | |||
| 98 | /** | ||
| 99 | * struct drm_client_buffer - DRM client buffer | ||
| 100 | */ | ||
| 101 | struct drm_client_buffer { | ||
| 102 | /** | ||
| 103 | * @client: DRM client | ||
| 104 | */ | ||
| 105 | struct drm_client_dev *client; | ||
| 106 | |||
| 107 | /** | ||
| 108 | * @handle: Buffer handle | ||
| 109 | */ | ||
| 110 | u32 handle; | ||
| 111 | |||
| 112 | /** | ||
| 113 | * @pitch: Buffer pitch | ||
| 114 | */ | ||
| 115 | u32 pitch; | ||
| 116 | |||
| 117 | /** | ||
| 118 | * @gem: GEM object backing this buffer | ||
| 119 | */ | ||
| 120 | struct drm_gem_object *gem; | ||
| 121 | |||
| 122 | /** | ||
| 123 | * @vaddr: Virtual address for the buffer | ||
| 124 | */ | ||
| 125 | void *vaddr; | ||
| 126 | |||
| 127 | /** | ||
| 128 | * @fb: DRM framebuffer | ||
| 129 | */ | ||
| 130 | struct drm_framebuffer *fb; | ||
| 131 | }; | ||
| 132 | |||
| 133 | struct drm_client_buffer * | ||
| 134 | drm_client_framebuffer_create(struct drm_client_dev *client, u32 width, u32 height, u32 format); | ||
| 135 | void drm_client_framebuffer_delete(struct drm_client_buffer *buffer); | ||
| 136 | |||
| 137 | int drm_client_debugfs_init(struct drm_minor *minor); | ||
| 138 | |||
| 139 | #endif | ||
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index bf0f0f0786d3..a5179eb9e56f 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h | |||
| @@ -290,6 +290,10 @@ struct drm_display_info { | |||
| 290 | #define DRM_BUS_FLAG_DATA_MSB_TO_LSB (1<<4) | 290 | #define DRM_BUS_FLAG_DATA_MSB_TO_LSB (1<<4) |
| 291 | /* data is transmitted LSB to MSB on the bus */ | 291 | /* data is transmitted LSB to MSB on the bus */ |
| 292 | #define DRM_BUS_FLAG_DATA_LSB_TO_MSB (1<<5) | 292 | #define DRM_BUS_FLAG_DATA_LSB_TO_MSB (1<<5) |
| 293 | /* drive sync on pos. edge */ | ||
| 294 | #define DRM_BUS_FLAG_SYNC_POSEDGE (1<<6) | ||
| 295 | /* drive sync on neg. edge */ | ||
| 296 | #define DRM_BUS_FLAG_SYNC_NEGEDGE (1<<7) | ||
| 293 | 297 | ||
| 294 | /** | 298 | /** |
| 295 | * @bus_flags: Additional information (like pixel signal polarity) for | 299 | * @bus_flags: Additional information (like pixel signal polarity) for |
| @@ -1187,6 +1191,9 @@ struct drm_connector * | |||
| 1187 | drm_connector_list_iter_next(struct drm_connector_list_iter *iter); | 1191 | drm_connector_list_iter_next(struct drm_connector_list_iter *iter); |
| 1188 | void drm_connector_list_iter_end(struct drm_connector_list_iter *iter); | 1192 | void drm_connector_list_iter_end(struct drm_connector_list_iter *iter); |
| 1189 | 1193 | ||
| 1194 | bool drm_connector_has_possible_encoder(struct drm_connector *connector, | ||
| 1195 | struct drm_encoder *encoder); | ||
| 1196 | |||
| 1190 | /** | 1197 | /** |
| 1191 | * drm_for_each_connector_iter - connector_list iterator macro | 1198 | * drm_for_each_connector_iter - connector_list iterator macro |
| 1192 | * @connector: &struct drm_connector pointer used as cursor | 1199 | * @connector: &struct drm_connector pointer used as cursor |
| @@ -1199,4 +1206,17 @@ void drm_connector_list_iter_end(struct drm_connector_list_iter *iter); | |||
| 1199 | #define drm_for_each_connector_iter(connector, iter) \ | 1206 | #define drm_for_each_connector_iter(connector, iter) \ |
| 1200 | while ((connector = drm_connector_list_iter_next(iter))) | 1207 | while ((connector = drm_connector_list_iter_next(iter))) |
| 1201 | 1208 | ||
| 1209 | /** | ||
| 1210 | * drm_connector_for_each_possible_encoder - iterate connector's possible encoders | ||
| 1211 | * @connector: &struct drm_connector pointer | ||
| 1212 | * @encoder: &struct drm_encoder pointer used as cursor | ||
| 1213 | * @__i: int iteration cursor, for macro-internal use | ||
| 1214 | */ | ||
| 1215 | #define drm_connector_for_each_possible_encoder(connector, encoder, __i) \ | ||
| 1216 | for ((__i) = 0; (__i) < ARRAY_SIZE((connector)->encoder_ids) && \ | ||
| 1217 | (connector)->encoder_ids[(__i)] != 0; (__i)++) \ | ||
| 1218 | for_each_if((encoder) = \ | ||
| 1219 | drm_encoder_find((connector)->dev, NULL, \ | ||
| 1220 | (connector)->encoder_ids[(__i)])) \ | ||
| 1221 | |||
| 1202 | #endif | 1222 | #endif |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 23eddbccab10..17f4f93340b8 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -119,6 +119,29 @@ struct drm_crtc_state { | |||
| 119 | bool zpos_changed : 1; | 119 | bool zpos_changed : 1; |
| 120 | bool color_mgmt_changed : 1; | 120 | bool color_mgmt_changed : 1; |
| 121 | 121 | ||
| 122 | /** | ||
| 123 | * @no_vblank: | ||
| 124 | * | ||
| 125 | * Reflects the ability of a CRTC to send VBLANK events. This state | ||
| 126 | * usually depends on the pipeline configuration, and the main usuage | ||
| 127 | * is CRTCs feeding a writeback connector operating in oneshot mode. | ||
| 128 | * In this case the VBLANK event is only generated when a job is queued | ||
| 129 | * to the writeback connector, and we want the core to fake VBLANK | ||
| 130 | * events when this part of the pipeline hasn't changed but others had | ||
| 131 | * or when the CRTC and connectors are being disabled. | ||
| 132 | * | ||
| 133 | * __drm_atomic_helper_crtc_duplicate_state() will not reset the value | ||
| 134 | * from the current state, the CRTC driver is then responsible for | ||
| 135 | * updating this field when needed. | ||
| 136 | * | ||
| 137 | * Note that the combination of &drm_crtc_state.event == NULL and | ||
| 138 | * &drm_crtc_state.no_blank == true is valid and usually used when the | ||
| 139 | * writeback connector attached to the CRTC has a new job queued. In | ||
| 140 | * this case the driver will send the VBLANK event on its own when the | ||
| 141 | * writeback job is complete. | ||
| 142 | */ | ||
| 143 | bool no_vblank : 1; | ||
| 144 | |||
| 122 | /* attached planes bitmask: | 145 | /* attached planes bitmask: |
| 123 | * WARNING: transitional helpers do not maintain plane_mask so | 146 | * WARNING: transitional helpers do not maintain plane_mask so |
| 124 | * drivers not converted over to atomic helpers should not rely | 147 | * drivers not converted over to atomic helpers should not rely |
diff --git a/include/drm/drm_debugfs_crc.h b/include/drm/drm_debugfs_crc.h index 7d63b1d4adb9..b225eeb30d05 100644 --- a/include/drm/drm_debugfs_crc.h +++ b/include/drm/drm_debugfs_crc.h | |||
| @@ -43,6 +43,7 @@ struct drm_crtc_crc_entry { | |||
| 43 | * @lock: protects the fields in this struct | 43 | * @lock: protects the fields in this struct |
| 44 | * @source: name of the currently configured source of CRCs | 44 | * @source: name of the currently configured source of CRCs |
| 45 | * @opened: whether userspace has opened the data file for reading | 45 | * @opened: whether userspace has opened the data file for reading |
| 46 | * @overflow: whether an overflow occured. | ||
| 46 | * @entries: array of entries, with size of %DRM_CRC_ENTRIES_NR | 47 | * @entries: array of entries, with size of %DRM_CRC_ENTRIES_NR |
| 47 | * @head: head of circular queue | 48 | * @head: head of circular queue |
| 48 | * @tail: tail of circular queue | 49 | * @tail: tail of circular queue |
| @@ -52,7 +53,7 @@ struct drm_crtc_crc_entry { | |||
| 52 | struct drm_crtc_crc { | 53 | struct drm_crtc_crc { |
| 53 | spinlock_t lock; | 54 | spinlock_t lock; |
| 54 | const char *source; | 55 | const char *source; |
| 55 | bool opened; | 56 | bool opened, overflow; |
| 56 | struct drm_crtc_crc_entry *entries; | 57 | struct drm_crtc_crc_entry *entries; |
| 57 | int head, tail; | 58 | int head, tail; |
| 58 | size_t values_cnt; | 59 | size_t values_cnt; |
diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h index 858ba19a3e29..f9c6e0e3aec7 100644 --- a/include/drm/drm_device.h +++ b/include/drm/drm_device.h | |||
| @@ -74,6 +74,27 @@ struct drm_device { | |||
| 74 | struct mutex filelist_mutex; | 74 | struct mutex filelist_mutex; |
| 75 | struct list_head filelist; | 75 | struct list_head filelist; |
| 76 | 76 | ||
| 77 | /** | ||
| 78 | * @filelist_internal: | ||
| 79 | * | ||
| 80 | * List of open DRM files for in-kernel clients. Protected by @filelist_mutex. | ||
| 81 | */ | ||
| 82 | struct list_head filelist_internal; | ||
| 83 | |||
| 84 | /** | ||
| 85 | * @clientlist_mutex: | ||
| 86 | * | ||
| 87 | * Protects @clientlist access. | ||
| 88 | */ | ||
| 89 | struct mutex clientlist_mutex; | ||
| 90 | |||
| 91 | /** | ||
| 92 | * @clientlist: | ||
| 93 | * | ||
| 94 | * List of in-kernel clients. Protected by @clientlist_mutex. | ||
| 95 | */ | ||
| 96 | struct list_head clientlist; | ||
| 97 | |||
| 77 | /** \name Memory management */ | 98 | /** \name Memory management */ |
| 78 | /*@{ */ | 99 | /*@{ */ |
| 79 | struct list_head maplist; /**< Linked list of regions */ | 100 | struct list_head maplist; /**< Linked list of regions */ |
diff --git a/include/drm/drm_fb_cma_helper.h b/include/drm/drm_fb_cma_helper.h index d532f88a8d55..96e26e3b9a0c 100644 --- a/include/drm/drm_fb_cma_helper.h +++ b/include/drm/drm_fb_cma_helper.h | |||
| @@ -16,16 +16,10 @@ struct drm_mode_fb_cmd2; | |||
| 16 | struct drm_plane; | 16 | struct drm_plane; |
| 17 | struct drm_plane_state; | 17 | struct drm_plane_state; |
| 18 | 18 | ||
| 19 | int drm_fb_cma_fbdev_init_with_funcs(struct drm_device *dev, | ||
| 20 | unsigned int preferred_bpp, unsigned int max_conn_count, | ||
| 21 | const struct drm_framebuffer_funcs *funcs); | ||
| 22 | int drm_fb_cma_fbdev_init(struct drm_device *dev, unsigned int preferred_bpp, | 19 | int drm_fb_cma_fbdev_init(struct drm_device *dev, unsigned int preferred_bpp, |
| 23 | unsigned int max_conn_count); | 20 | unsigned int max_conn_count); |
| 24 | void drm_fb_cma_fbdev_fini(struct drm_device *dev); | 21 | void drm_fb_cma_fbdev_fini(struct drm_device *dev); |
| 25 | 22 | ||
| 26 | struct drm_fbdev_cma *drm_fbdev_cma_init_with_funcs(struct drm_device *dev, | ||
| 27 | unsigned int preferred_bpp, unsigned int max_conn_count, | ||
| 28 | const struct drm_framebuffer_funcs *funcs); | ||
| 29 | struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev, | 23 | struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev, |
| 30 | unsigned int preferred_bpp, unsigned int max_conn_count); | 24 | unsigned int preferred_bpp, unsigned int max_conn_count); |
| 31 | void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma); | 25 | void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma); |
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index b069433e7fc1..5db08c8f1d25 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | struct drm_fb_helper; | 33 | struct drm_fb_helper; |
| 34 | 34 | ||
| 35 | #include <drm/drm_client.h> | ||
| 35 | #include <drm/drm_crtc.h> | 36 | #include <drm/drm_crtc.h> |
| 36 | #include <drm/drm_device.h> | 37 | #include <drm/drm_device.h> |
| 37 | #include <linux/kgdb.h> | 38 | #include <linux/kgdb.h> |
| @@ -154,6 +155,20 @@ struct drm_fb_helper_connector { | |||
| 154 | * operations. | 155 | * operations. |
| 155 | */ | 156 | */ |
| 156 | struct drm_fb_helper { | 157 | struct drm_fb_helper { |
| 158 | /** | ||
| 159 | * @client: | ||
| 160 | * | ||
| 161 | * DRM client used by the generic fbdev emulation. | ||
| 162 | */ | ||
| 163 | struct drm_client_dev client; | ||
| 164 | |||
| 165 | /** | ||
| 166 | * @buffer: | ||
| 167 | * | ||
| 168 | * Framebuffer used by the generic fbdev emulation. | ||
| 169 | */ | ||
| 170 | struct drm_client_buffer *buffer; | ||
| 171 | |||
| 157 | struct drm_framebuffer *fb; | 172 | struct drm_framebuffer *fb; |
| 158 | struct drm_device *dev; | 173 | struct drm_device *dev; |
| 159 | int crtc_count; | 174 | int crtc_count; |
| @@ -234,6 +249,12 @@ struct drm_fb_helper { | |||
| 234 | int preferred_bpp; | 249 | int preferred_bpp; |
| 235 | }; | 250 | }; |
| 236 | 251 | ||
| 252 | static inline struct drm_fb_helper * | ||
| 253 | drm_fb_helper_from_client(struct drm_client_dev *client) | ||
| 254 | { | ||
| 255 | return container_of(client, struct drm_fb_helper, client); | ||
| 256 | } | ||
| 257 | |||
| 237 | /** | 258 | /** |
| 238 | * define DRM_FB_HELPER_DEFAULT_OPS - helper define for drm drivers | 259 | * define DRM_FB_HELPER_DEFAULT_OPS - helper define for drm drivers |
| 239 | * | 260 | * |
| @@ -330,6 +351,10 @@ void drm_fb_helper_fbdev_teardown(struct drm_device *dev); | |||
| 330 | 351 | ||
| 331 | void drm_fb_helper_lastclose(struct drm_device *dev); | 352 | void drm_fb_helper_lastclose(struct drm_device *dev); |
| 332 | void drm_fb_helper_output_poll_changed(struct drm_device *dev); | 353 | void drm_fb_helper_output_poll_changed(struct drm_device *dev); |
| 354 | |||
| 355 | int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, | ||
| 356 | struct drm_fb_helper_surface_size *sizes); | ||
| 357 | int drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp); | ||
| 333 | #else | 358 | #else |
| 334 | static inline void drm_fb_helper_prepare(struct drm_device *dev, | 359 | static inline void drm_fb_helper_prepare(struct drm_device *dev, |
| 335 | struct drm_fb_helper *helper, | 360 | struct drm_fb_helper *helper, |
| @@ -564,6 +589,19 @@ static inline void drm_fb_helper_output_poll_changed(struct drm_device *dev) | |||
| 564 | { | 589 | { |
| 565 | } | 590 | } |
| 566 | 591 | ||
| 592 | static inline int | ||
| 593 | drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, | ||
| 594 | struct drm_fb_helper_surface_size *sizes) | ||
| 595 | { | ||
| 596 | return 0; | ||
| 597 | } | ||
| 598 | |||
| 599 | static inline int | ||
| 600 | drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp) | ||
| 601 | { | ||
| 602 | return 0; | ||
| 603 | } | ||
| 604 | |||
| 567 | #endif | 605 | #endif |
| 568 | 606 | ||
| 569 | static inline int | 607 | static inline int |
diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h index 3b289773297c..d0eb76c4b309 100644 --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h | |||
| @@ -980,11 +980,15 @@ struct drm_connector_helper_funcs { | |||
| 980 | * | 980 | * |
| 981 | * This hook is to be used by drivers implementing writeback connectors | 981 | * This hook is to be used by drivers implementing writeback connectors |
| 982 | * that need a point when to commit the writeback job to the hardware. | 982 | * that need a point when to commit the writeback job to the hardware. |
| 983 | * The writeback_job to commit is available in | ||
| 984 | * &drm_connector_state.writeback_job. | ||
| 985 | * | ||
| 986 | * This hook is optional. | ||
| 983 | * | 987 | * |
| 984 | * This callback is used by the atomic modeset helpers. | 988 | * This callback is used by the atomic modeset helpers. |
| 985 | */ | 989 | */ |
| 986 | void (*atomic_commit)(struct drm_connector *connector, | 990 | void (*atomic_commit)(struct drm_connector *connector, |
| 987 | struct drm_writeback_job *writeback_job); | 991 | struct drm_connector_state *state); |
| 988 | }; | 992 | }; |
| 989 | 993 | ||
| 990 | /** | 994 | /** |
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 26a1b5fd8796..582a0ec0aa70 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h | |||
| @@ -200,7 +200,7 @@ struct drm_panel *of_drm_find_panel(const struct device_node *np); | |||
| 200 | #else | 200 | #else |
| 201 | static inline struct drm_panel *of_drm_find_panel(const struct device_node *np) | 201 | static inline struct drm_panel *of_drm_find_panel(const struct device_node *np) |
| 202 | { | 202 | { |
| 203 | return NULL; | 203 | return ERR_PTR(-ENODEV); |
| 204 | } | 204 | } |
| 205 | #endif | 205 | #endif |
| 206 | 206 | ||
diff --git a/include/drm/drm_writeback.h b/include/drm/drm_writeback.h index a10fe556dfd4..23df9d463003 100644 --- a/include/drm/drm_writeback.h +++ b/include/drm/drm_writeback.h | |||
| @@ -110,6 +110,12 @@ struct drm_writeback_job { | |||
| 110 | struct dma_fence *out_fence; | 110 | struct dma_fence *out_fence; |
| 111 | }; | 111 | }; |
| 112 | 112 | ||
| 113 | static inline struct drm_writeback_connector * | ||
| 114 | drm_connector_to_writeback(struct drm_connector *connector) | ||
| 115 | { | ||
| 116 | return container_of(connector, struct drm_writeback_connector, base); | ||
| 117 | } | ||
| 118 | |||
| 113 | int drm_writeback_connector_init(struct drm_device *dev, | 119 | int drm_writeback_connector_init(struct drm_device *dev, |
| 114 | struct drm_writeback_connector *wb_connector, | 120 | struct drm_writeback_connector *wb_connector, |
| 115 | const struct drm_connector_funcs *con_funcs, | 121 | const struct drm_connector_funcs *con_funcs, |
diff --git a/include/drm/tinydrm/tinydrm.h b/include/drm/tinydrm/tinydrm.h index 56e4a916b5e8..fe9827d0ca8a 100644 --- a/include/drm/tinydrm/tinydrm.h +++ b/include/drm/tinydrm/tinydrm.h | |||
| @@ -16,16 +16,31 @@ | |||
| 16 | 16 | ||
| 17 | /** | 17 | /** |
| 18 | * struct tinydrm_device - tinydrm device | 18 | * struct tinydrm_device - tinydrm device |
| 19 | * @drm: DRM device | ||
| 20 | * @pipe: Display pipe structure | ||
| 21 | * @dirty_lock: Serializes framebuffer flushing | ||
| 22 | * @fb_funcs: Framebuffer functions used when creating framebuffers | ||
| 23 | */ | 19 | */ |
| 24 | struct tinydrm_device { | 20 | struct tinydrm_device { |
| 21 | /** | ||
| 22 | * @drm: DRM device | ||
| 23 | */ | ||
| 25 | struct drm_device *drm; | 24 | struct drm_device *drm; |
| 25 | |||
| 26 | /** | ||
| 27 | * @pipe: Display pipe structure | ||
| 28 | */ | ||
| 26 | struct drm_simple_display_pipe pipe; | 29 | struct drm_simple_display_pipe pipe; |
| 30 | |||
| 31 | /** | ||
| 32 | * @dirty_lock: Serializes framebuffer flushing | ||
| 33 | */ | ||
| 27 | struct mutex dirty_lock; | 34 | struct mutex dirty_lock; |
| 35 | |||
| 36 | /** | ||
| 37 | * @fb_funcs: Framebuffer functions used when creating framebuffers | ||
| 38 | */ | ||
| 28 | const struct drm_framebuffer_funcs *fb_funcs; | 39 | const struct drm_framebuffer_funcs *fb_funcs; |
| 40 | |||
| 41 | /** | ||
| 42 | * @fb_dirty: Framebuffer dirty callback | ||
| 43 | */ | ||
| 29 | int (*fb_dirty)(struct drm_framebuffer *framebuffer, | 44 | int (*fb_dirty)(struct drm_framebuffer *framebuffer, |
| 30 | struct drm_file *file_priv, unsigned flags, | 45 | struct drm_file *file_priv, unsigned flags, |
| 31 | unsigned color, struct drm_clip_rect *clips, | 46 | unsigned color, struct drm_clip_rect *clips, |
