diff options
author | Dave Airlie | 2019-03-25 10:55:43 +1000 |
---|---|---|
committer | Dave Airlie | 2019-03-25 10:55:57 +1000 |
commit | 535f6f5d7b7f7b3127c1c8172ff0504260d14f45 (patch) | |
tree | d4e8c8cdb35fd4eb488ddbdc29b80a1a8191b901 /include/drm | |
parent | b9e687fc0aa40307af873dbd4ccb66bd95989ae5 (diff) | |
parent | 12e32f554d8ddd121f17aaaa9cda25d0be612af9 (diff) |
Merge tag 'du-next-20190318' of git://linuxtv.org/pinchartl/media into drm-next
Renesas display drivers changes for v5.2:
- Display writeback (includes VSP changes and DRM/KMS API changes)
(All v4l patches acked by Mauro)
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190318153613.GE12707@pendragon.ideasonboard.com
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_modeset_helper_vtables.h | 7 | ||||
-rw-r--r-- | include/drm/drm_writeback.h | 30 |
2 files changed, 35 insertions, 2 deletions
diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h index cfb7be40bed7..8f3602811eb5 100644 --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h @@ -49,6 +49,8 @@ */ enum mode_set_atomic; +struct drm_writeback_connector; +struct drm_writeback_job; /** * struct drm_crtc_helper_funcs - helper operations for CRTCs @@ -989,6 +991,11 @@ struct drm_connector_helper_funcs { */ void (*atomic_commit)(struct drm_connector *connector, struct drm_connector_state *state); + + int (*prepare_writeback_job)(struct drm_writeback_connector *connector, + struct drm_writeback_job *job); + void (*cleanup_writeback_job)(struct drm_writeback_connector *connector, + struct drm_writeback_job *job); }; /** diff --git a/include/drm/drm_writeback.h b/include/drm/drm_writeback.h index 23df9d463003..777c14c847f0 100644 --- a/include/drm/drm_writeback.h +++ b/include/drm/drm_writeback.h @@ -80,6 +80,20 @@ struct drm_writeback_connector { struct drm_writeback_job { /** + * @connector: + * + * Back-pointer to the writeback connector associated with the job + */ + struct drm_writeback_connector *connector; + + /** + * @prepared: + * + * Set when the job has been prepared with drm_writeback_prepare_job() + */ + bool prepared; + + /** * @cleanup_work: * * Used to allow drm_writeback_signal_completion to defer dropping the @@ -98,7 +112,7 @@ struct drm_writeback_job { * @fb: * * Framebuffer to be written to by the writeback connector. Do not set - * directly, use drm_atomic_set_writeback_fb_for_connector() + * directly, use drm_writeback_set_fb() */ struct drm_framebuffer *fb; @@ -108,6 +122,13 @@ struct drm_writeback_job { * Fence which will signal once the writeback has completed */ struct dma_fence *out_fence; + + /** + * @priv: + * + * Driver-private data + */ + void *priv; }; static inline struct drm_writeback_connector * @@ -122,8 +143,13 @@ int drm_writeback_connector_init(struct drm_device *dev, const struct drm_encoder_helper_funcs *enc_helper_funcs, const u32 *formats, int n_formats); +int drm_writeback_set_fb(struct drm_connector_state *conn_state, + struct drm_framebuffer *fb); + +int drm_writeback_prepare_job(struct drm_writeback_job *job); + void drm_writeback_queue_job(struct drm_writeback_connector *wb_connector, - struct drm_writeback_job *job); + struct drm_connector_state *conn_state); void drm_writeback_cleanup_job(struct drm_writeback_job *job); |