Skip to content

Commit af93629

Browse files
mattroperobclark
authored andcommitted
drm: Make drm_crtc_check_viewport non-static
This function will be used by the universal plane helpers and may also be useful for individual drivers. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
1 parent 2b79dc1 commit af93629

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

drivers/gpu/drm/drm_crtc.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,14 +2186,19 @@ int drm_mode_set_config_internal(struct drm_mode_set *set)
21862186
}
21872187
EXPORT_SYMBOL(drm_mode_set_config_internal);
21882188

2189-
/*
2190-
* Checks that the framebuffer is big enough for the CRTC viewport
2191-
* (x, y, hdisplay, vdisplay)
2189+
/**
2190+
* drm_crtc_check_viewport - Checks that a framebuffer is big enough for the
2191+
* CRTC viewport
2192+
* @crtc: CRTC that framebuffer will be displayed on
2193+
* @x: x panning
2194+
* @y: y panning
2195+
* @mode: mode that framebuffer will be displayed under
2196+
* @fb: framebuffer to check size of
21922197
*/
2193-
static int drm_crtc_check_viewport(const struct drm_crtc *crtc,
2194-
int x, int y,
2195-
const struct drm_display_mode *mode,
2196-
const struct drm_framebuffer *fb)
2198+
int drm_crtc_check_viewport(const struct drm_crtc *crtc,
2199+
int x, int y,
2200+
const struct drm_display_mode *mode,
2201+
const struct drm_framebuffer *fb)
21972202

21982203
{
21992204
int hdisplay, vdisplay;
@@ -2224,6 +2229,7 @@ static int drm_crtc_check_viewport(const struct drm_crtc *crtc,
22242229

22252230
return 0;
22262231
}
2232+
EXPORT_SYMBOL(drm_crtc_check_viewport);
22272233

22282234
/**
22292235
* drm_mode_setcrtc - set CRTC configuration

include/drm/drm_crtc.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,10 @@ extern int drm_plane_init(struct drm_device *dev,
882882
bool priv);
883883
extern void drm_plane_cleanup(struct drm_plane *plane);
884884
extern void drm_plane_force_disable(struct drm_plane *plane);
885+
extern int drm_crtc_check_viewport(const struct drm_crtc *crtc,
886+
int x, int y,
887+
const struct drm_display_mode *mode,
888+
const struct drm_framebuffer *fb);
885889

886890
extern void drm_encoder_cleanup(struct drm_encoder *encoder);
887891

0 commit comments

Comments
 (0)