aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/drm/drm_mode_config.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2017-03-21 20:12:16 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2017-03-22 19:45:00 +0200
commit6a0f9ebfc5e753bb948c13353615324462d73795 (patch)
tree1ccb2551fc4bd3293ce63a995c2f3301ee4690a9 /include/drm/drm_mode_config.h
parentdrm: Remove fb hsub/vsub alignment requirement (diff)
downloadwireguard-linux-6a0f9ebfc5e753bb948c13353615324462d73795.tar.xz
wireguard-linux-6a0f9ebfc5e753bb948c13353615324462d73795.zip
drm: Add mode_config .get_format_info() hook
Allow drivers to return a custom drm_format_info structure for special fb layouts. We'll use this for the compression control surface in i915. v2: Fix drm_get_format_info() kernel doc (Laurent) Don't pass 'dev' to the new hook (Laurent) v3: s/compresssion/compression/ (Ben) Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170321181218.10042-4-ville.syrjala@linux.intel.com
Diffstat (limited to 'include/drm/drm_mode_config.h')
-rw-r--r--include/drm/drm_mode_config.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
index ea169a90b3c4..579070ff06ef 100644
--- a/include/drm/drm_mode_config.h
+++ b/include/drm/drm_mode_config.h
@@ -34,6 +34,7 @@ struct drm_file;
struct drm_device;
struct drm_atomic_state;
struct drm_mode_fb_cmd2;
+struct drm_format_info;
/**
* struct drm_mode_config_funcs - basic driver provided mode setting functions
@@ -70,6 +71,19 @@ struct drm_mode_config_funcs {
const struct drm_mode_fb_cmd2 *mode_cmd);
/**
+ * @get_format_info:
+ *
+ * Allows a driver to return custom format information for special
+ * fb layouts (eg. ones with auxiliary compression control planes).
+ *
+ * RETURNS:
+ *
+ * The format information specific to the given fb metadata, or
+ * NULL if none is found.
+ */
+ const struct drm_format_info *(*get_format_info)(const struct drm_mode_fb_cmd2 *mode_cmd);
+
+ /**
* @output_poll_changed:
*
* Callback used by helpers to inform the driver of output configuration