Commit f15f01a7 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915: s/intel_crtc/crtc/

parent 08dfd243
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -729,8 +729,8 @@ gen11_dsi_configure_transcoder(struct intel_encoder *encoder,
{
	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
	struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->uapi.crtc);
	enum pipe pipe = intel_crtc->pipe;
	struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
	enum pipe pipe = crtc->pipe;
	u32 tmp;
	enum port port;
	enum transcoder dsi_trans;
+4 −4
Original line number Diff line number Diff line
@@ -163,12 +163,12 @@ static void intel_crtc_free(struct intel_crtc *crtc)
	kfree(crtc);
}

static void intel_crtc_destroy(struct drm_crtc *crtc)
static void intel_crtc_destroy(struct drm_crtc *_crtc)
{
	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
	struct intel_crtc *crtc = to_intel_crtc(_crtc);

	drm_crtc_cleanup(crtc);
	kfree(intel_crtc);
	drm_crtc_cleanup(&crtc->base);
	kfree(crtc);
}

static int intel_crtc_late_register(struct drm_crtc *crtc)
+3 −3
Original line number Diff line number Diff line
@@ -3525,7 +3525,7 @@ static void intel_ddi_read_func_ctl(struct intel_encoder *encoder,
				    struct intel_crtc_state *pipe_config)
{
	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
	struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->uapi.crtc);
	struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
	enum transcoder cpu_transcoder = pipe_config->cpu_transcoder;
	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
	u32 temp, flags = 0;
@@ -3588,7 +3588,7 @@ static void intel_ddi_read_func_ctl(struct intel_encoder *encoder,
			pipe_config->output_types |= BIT(INTEL_OUTPUT_DP);
		pipe_config->lane_count =
			((temp & DDI_PORT_WIDTH_MASK) >> DDI_PORT_WIDTH_SHIFT) + 1;
		intel_dp_get_m_n(intel_crtc, pipe_config);
		intel_dp_get_m_n(crtc, pipe_config);

		if (DISPLAY_VER(dev_priv) >= 11) {
			i915_reg_t dp_tp_ctl = dp_tp_ctl_reg(encoder, pipe_config);
@@ -3618,7 +3618,7 @@ static void intel_ddi_read_func_ctl(struct intel_encoder *encoder,
			pipe_config->mst_master_transcoder =
					REG_FIELD_GET(TRANS_DDI_MST_TRANSPORT_SELECT_MASK, temp);

		intel_dp_get_m_n(intel_crtc, pipe_config);
		intel_dp_get_m_n(crtc, pipe_config);

		pipe_config->infoframes.enable |=
			intel_hdmi_infoframes_enabled(encoder, pipe_config);
+3 −3
Original line number Diff line number Diff line
@@ -2717,10 +2717,10 @@ void hsw_disable_ips(const struct intel_crtc_state *crtc_state)
	intel_wait_for_vblank(dev_priv, crtc->pipe);
}

static void intel_crtc_dpms_overlay_disable(struct intel_crtc *intel_crtc)
static void intel_crtc_dpms_overlay_disable(struct intel_crtc *crtc)
{
	if (intel_crtc->overlay)
		(void) intel_overlay_switch_off(intel_crtc->overlay);
	if (crtc->overlay)
		(void) intel_overlay_switch_off(crtc->overlay);

	/* Let userspace switch the overlay on again. In most cases userspace
	 * has to recompute where to put it anyway.
+14 −14
Original line number Diff line number Diff line
@@ -1229,7 +1229,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused)

static void drrs_status_per_crtc(struct seq_file *m,
				 struct drm_device *dev,
				 struct intel_crtc *intel_crtc)
				 struct intel_crtc *crtc)
{
	struct drm_i915_private *dev_priv = to_i915(dev);
	struct i915_drrs *drrs = &dev_priv->drrs;
@@ -1241,7 +1241,7 @@ static void drrs_status_per_crtc(struct seq_file *m,
	drm_for_each_connector_iter(connector, &conn_iter) {
		bool supported = false;

		if (connector->state->crtc != &intel_crtc->base)
		if (connector->state->crtc != &crtc->base)
			continue;

		seq_printf(m, "%s:\n", connector->name);
@@ -1256,7 +1256,7 @@ static void drrs_status_per_crtc(struct seq_file *m,

	seq_puts(m, "\n");

	if (to_intel_crtc_state(intel_crtc->base.state)->has_drrs) {
	if (to_intel_crtc_state(crtc->base.state)->has_drrs) {
		struct intel_panel *panel;

		mutex_lock(&drrs->mutex);
@@ -1302,16 +1302,16 @@ static int i915_drrs_status(struct seq_file *m, void *unused)
{
	struct drm_i915_private *dev_priv = node_to_i915(m->private);
	struct drm_device *dev = &dev_priv->drm;
	struct intel_crtc *intel_crtc;
	struct intel_crtc *crtc;
	int active_crtc_cnt = 0;

	drm_modeset_lock_all(dev);
	for_each_intel_crtc(dev, intel_crtc) {
		if (intel_crtc->base.state->active) {
	for_each_intel_crtc(dev, crtc) {
		if (crtc->base.state->active) {
			active_crtc_cnt++;
			seq_printf(m, "\nCRTC %d:  ", active_crtc_cnt);

			drrs_status_per_crtc(m, dev, intel_crtc);
			drrs_status_per_crtc(m, dev, crtc);
		}
	}
	drm_modeset_unlock_all(dev);
@@ -2068,7 +2068,7 @@ i915_fifo_underrun_reset_write(struct file *filp,
			       size_t cnt, loff_t *ppos)
{
	struct drm_i915_private *dev_priv = filp->private_data;
	struct intel_crtc *intel_crtc;
	struct intel_crtc *crtc;
	struct drm_device *dev = &dev_priv->drm;
	int ret;
	bool reset;
@@ -2080,15 +2080,15 @@ i915_fifo_underrun_reset_write(struct file *filp,
	if (!reset)
		return cnt;

	for_each_intel_crtc(dev, intel_crtc) {
	for_each_intel_crtc(dev, crtc) {
		struct drm_crtc_commit *commit;
		struct intel_crtc_state *crtc_state;

		ret = drm_modeset_lock_single_interruptible(&intel_crtc->base.mutex);
		ret = drm_modeset_lock_single_interruptible(&crtc->base.mutex);
		if (ret)
			return ret;

		crtc_state = to_intel_crtc_state(intel_crtc->base.state);
		crtc_state = to_intel_crtc_state(crtc->base.state);
		commit = crtc_state->uapi.commit;
		if (commit) {
			ret = wait_for_completion_interruptible(&commit->hw_done);
@@ -2099,12 +2099,12 @@ i915_fifo_underrun_reset_write(struct file *filp,
		if (!ret && crtc_state->hw.active) {
			drm_dbg_kms(&dev_priv->drm,
				    "Re-arming FIFO underruns on pipe %c\n",
				    pipe_name(intel_crtc->pipe));
				    pipe_name(crtc->pipe));

			intel_crtc_arm_fifo_underrun(intel_crtc, crtc_state);
			intel_crtc_arm_fifo_underrun(crtc, crtc_state);
		}

		drm_modeset_unlock(&intel_crtc->base.mutex);
		drm_modeset_unlock(&crtc->base.mutex);

		if (ret)
			return ret;
Loading