mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 11:40:19 -04:00
drm/i915: move intel_get_pipe_from_crtc_id_ioctl to intel_crtc.c
Reduce the size of and dependencies on intel_display.[ch], and move intel_get_pipe_from_crtc_id_ioctl() to intel_crtc.[ch]. Rename to intel_crtc_get_pipe_from_crtc_id_ioctl() while at it. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/edcf4477e6f38cc1f36a8afc0d09fd98544803ab.1726235647.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -389,6 +389,23 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int intel_crtc_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file)
|
||||
{
|
||||
struct drm_i915_get_pipe_from_crtc_id *pipe_from_crtc_id = data;
|
||||
struct drm_crtc *drm_crtc;
|
||||
struct intel_crtc *crtc;
|
||||
|
||||
drm_crtc = drm_crtc_find(dev, file, pipe_from_crtc_id->crtc_id);
|
||||
if (!drm_crtc)
|
||||
return -ENOENT;
|
||||
|
||||
crtc = to_intel_crtc(drm_crtc);
|
||||
pipe_from_crtc_id->pipe = crtc->pipe;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool intel_crtc_needs_vblank_work(const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
return crtc_state->hw.active &&
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
|
||||
enum i9xx_plane_id;
|
||||
enum pipe;
|
||||
struct drm_device;
|
||||
struct drm_display_mode;
|
||||
struct drm_file;
|
||||
struct drm_i915_private;
|
||||
struct intel_atomic_state;
|
||||
struct intel_crtc;
|
||||
@@ -32,6 +34,8 @@ int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode,
|
||||
void intel_crtc_arm_vblank_event(struct intel_crtc_state *crtc_state);
|
||||
u32 intel_crtc_max_vblank_count(const struct intel_crtc_state *crtc_state);
|
||||
int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe);
|
||||
int intel_crtc_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
struct intel_crtc_state *intel_crtc_state_alloc(struct intel_crtc *crtc);
|
||||
void intel_crtc_state_reset(struct intel_crtc_state *crtc_state,
|
||||
struct intel_crtc *crtc);
|
||||
|
||||
@@ -7709,23 +7709,6 @@ void intel_plane_destroy(struct drm_plane *plane)
|
||||
kfree(to_intel_plane(plane));
|
||||
}
|
||||
|
||||
int intel_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file)
|
||||
{
|
||||
struct drm_i915_get_pipe_from_crtc_id *pipe_from_crtc_id = data;
|
||||
struct drm_crtc *drmmode_crtc;
|
||||
struct intel_crtc *crtc;
|
||||
|
||||
drmmode_crtc = drm_crtc_find(dev, file, pipe_from_crtc_id->crtc_id);
|
||||
if (!drmmode_crtc)
|
||||
return -ENOENT;
|
||||
|
||||
crtc = to_intel_crtc(drmmode_crtc);
|
||||
pipe_from_crtc_id->pipe = crtc->pipe;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 intel_encoder_possible_clones(struct intel_encoder *encoder)
|
||||
{
|
||||
struct drm_device *dev = encoder->base.dev;
|
||||
|
||||
@@ -471,9 +471,6 @@ bool intel_encoder_is_snps(struct intel_encoder *encoder);
|
||||
bool intel_encoder_is_tc(struct intel_encoder *encoder);
|
||||
enum tc_port intel_encoder_to_tc(struct intel_encoder *encoder);
|
||||
|
||||
int intel_get_pipe_from_crtc_id_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
int ilk_get_lanes_required(int target_clock, int link_bw, int bpp);
|
||||
void vlv_wait_port_ready(struct drm_i915_private *dev_priv,
|
||||
struct intel_digital_port *dig_port,
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
#include "display/intel_acpi.h"
|
||||
#include "display/intel_bw.h"
|
||||
#include "display/intel_cdclk.h"
|
||||
#include "display/intel_crtc.h"
|
||||
#include "display/intel_display_driver.h"
|
||||
#include "display/intel_display.h"
|
||||
#include "display/intel_dmc.h"
|
||||
#include "display/intel_dp.h"
|
||||
#include "display/intel_dpt.h"
|
||||
@@ -1724,7 +1724,7 @@ static const struct drm_ioctl_desc i915_ioctls[] = {
|
||||
DRM_IOCTL_DEF_DRV(I915_GEM_SET_TILING, i915_gem_set_tiling_ioctl, DRM_RENDER_ALLOW),
|
||||
DRM_IOCTL_DEF_DRV(I915_GEM_GET_TILING, i915_gem_get_tiling_ioctl, DRM_RENDER_ALLOW),
|
||||
DRM_IOCTL_DEF_DRV(I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, DRM_RENDER_ALLOW),
|
||||
DRM_IOCTL_DEF_DRV(I915_GET_PIPE_FROM_CRTC_ID, intel_get_pipe_from_crtc_id_ioctl, 0),
|
||||
DRM_IOCTL_DEF_DRV(I915_GET_PIPE_FROM_CRTC_ID, intel_crtc_get_pipe_from_crtc_id_ioctl, 0),
|
||||
DRM_IOCTL_DEF_DRV(I915_GEM_MADVISE, i915_gem_madvise_ioctl, DRM_RENDER_ALLOW),
|
||||
DRM_IOCTL_DEF_DRV(I915_OVERLAY_PUT_IMAGE, intel_overlay_put_image_ioctl, DRM_MASTER),
|
||||
DRM_IOCTL_DEF_DRV(I915_OVERLAY_ATTRS, intel_overlay_attrs_ioctl, DRM_MASTER),
|
||||
|
||||
Reference in New Issue
Block a user