mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Diogo Silva <diogompaissilva@gmail.com>,
	Patrik Jakobsson <patrik.r.jakobsson@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/gma500: cdv_intel_dp: fix indentation to use tabs instead of spaces
Date: Fri, 17 Jul 2026 09:51:05 +0200	[thread overview]
Message-ID: <45f2c37d-0318-46e9-9b55-c840cffdafec@suse.de> (raw)
In-Reply-To: <20260623-cdv_intel_dp_indentation-v1-1-bcb61da38f17@gmail.com>



Am 23.06.26 um 21:56 schrieb Diogo Silva:
> The kernel coding style specifies that tabs should be used instead of
> spaces, which the cdv_intel_dp driver was not using in some places.
> This patch replaces the space indentations with tabs.
>
> Signed-off-by: Diogo Silva <diogompaissilva@gmail.com>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/gpu/drm/gma500/cdv_intel_dp.c | 111 +++++++++++++++++-----------------
>   1 file changed, 56 insertions(+), 55 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c
> index fbed35cf7603..7d08011d9663 100644
> --- a/drivers/gpu/drm/gma500/cdv_intel_dp.c
> +++ b/drivers/gpu/drm/gma500/cdv_intel_dp.c
> @@ -232,16 +232,17 @@ i2c_dp_aux_add_bus(struct i2c_adapter *adapter)
>   }
>   
>   #define _wait_for(COND, MS, W) ({ \
> -        unsigned long timeout__ = jiffies + msecs_to_jiffies(MS);       \
> -        int ret__ = 0;                                                  \
> -        while (! (COND)) {                                              \
> -                if (time_after(jiffies, timeout__)) {                   \
> -                        ret__ = -ETIMEDOUT;                             \
> -                        break;                                          \
> -                }                                                       \
> -                if (W && !in_dbg_master()) msleep(W);                   \
> -        }                                                               \
> -        ret__;                                                          \
> +	unsigned long timeout__ = jiffies + msecs_to_jiffies(MS);       \
> +	int ret__ = 0;                                                  \
> +	while (!(COND)) {                                               \
> +		if (time_after(jiffies, timeout__)) {                   \
> +			ret__ = -ETIMEDOUT;                             \
> +			break;                                          \
> +		}                                                       \
> +		if (W && !in_dbg_master())                              \
> +			msleep(W);                                      \
> +	}                                                               \
> +	ret__;                                                          \
>   })
>   
>   #define wait_for(COND, MS) _wait_for(COND, MS, 1)
> @@ -296,10 +297,10 @@ static struct ddi_regoff ddi_DP_train_table[] = {
>   };
>   
>   static uint32_t dp_vswing_premph_table[] = {
> -        0x55338954,	0x4000,
> -        0x554d8954,	0x2000,
> -        0x55668954,	0,
> -        0x559ac0d4,	0x6000,
> +	0x55338954,	0x4000,
> +	0x554d8954,	0x2000,
> +	0x55668954,	0,
> +	0x559ac0d4,	0x6000,
>   };
>   /**
>    * is_edp - is the given port attached to an eDP panel (either CPU or PCH)
> @@ -1141,7 +1142,7 @@ static void cdv_intel_dp_prepare(struct drm_encoder *encoder)
>   		cdv_intel_edp_backlight_off(intel_encoder);
>   		cdv_intel_edp_panel_off(intel_encoder);
>   		cdv_intel_edp_panel_vdd_on(intel_encoder);
> -        }
> +	}
>   	/* Wake up the sink first */
>   	cdv_intel_dp_sink_dpms(intel_encoder, DRM_MODE_DPMS_ON);
>   	cdv_intel_dp_link_down(intel_encoder);
> @@ -1183,7 +1184,7 @@ cdv_intel_dp_dpms(struct drm_encoder *encoder, int mode)
>   			cdv_intel_edp_panel_off(intel_encoder);
>   		}
>   	} else {
> -        	if (edp)
> +		if (edp)
>   			cdv_intel_edp_panel_on(intel_encoder);
>   		cdv_intel_dp_sink_dpms(intel_encoder, mode);
>   		if (!(dp_reg & DP_PORT_EN)) {
> @@ -1191,7 +1192,7 @@ cdv_intel_dp_dpms(struct drm_encoder *encoder, int mode)
>   			cdv_intel_dp_complete_link_train(intel_encoder);
>   		}
>   		if (edp)
> -        		cdv_intel_edp_backlight_on(intel_encoder);
> +			cdv_intel_edp_backlight_on(intel_encoder);
>   	}
>   }
>   
> @@ -1419,8 +1420,8 @@ cdv_intel_dp_set_vswing_premph(struct gma_encoder *encoder, uint8_t signal_level
>   	DRM_DEBUG_KMS("Test2\n");
>   	//return ;
>   	cdv_sb_reset(dev);
> -	/* ;Swing voltage programming
> -        ;gfx_dpio_set_reg(0xc058, 0x0505313A) */
> +	/* ;Swing voltage programming */
> +	/* ;gfx_dpio_set_reg(0xc058, 0x0505313A) */
>   	cdv_sb_write(dev, ddi_reg->VSwing5, 0x0505313A);
>   
>   	/* ;gfx_dpio_set_reg(0x8154, 0x43406055) */
> @@ -1575,7 +1576,7 @@ cdv_intel_dp_complete_link_train(struct gma_encoder *encoder)
>   				intel_dp->train_set[0],
>   				intel_dp->link_configuration[0],
>   				intel_dp->link_configuration[1]);
> -        	/* channel eq pattern */
> +		/* channel eq pattern */
>   
>   		if (!cdv_intel_dp_set_link_train(encoder, reg,
>   					     DP_TRAINING_PATTERN_2)) {
> @@ -1704,7 +1705,7 @@ cdv_intel_dp_detect(struct drm_connector *connector, bool force)
>   		if (edp)
>   			cdv_intel_edp_panel_vdd_off(encoder);
>   		return status;
> -        }
> +	}
>   
>   	if (intel_dp->force_audio) {
>   		intel_dp->has_audio = intel_dp->force_audio > 0;
> @@ -1956,12 +1957,12 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev
>   	gma_encoder = kzalloc_obj(struct gma_encoder);
>   	if (!gma_encoder)
>   		return;
> -        gma_connector = kzalloc_obj(struct gma_connector);
> -        if (!gma_connector)
> -                goto err_connector;
> +	gma_connector = kzalloc_obj(struct gma_connector);
> +	if (!gma_connector)
> +		goto err_connector;
>   	intel_dp = kzalloc_obj(struct cdv_intel_dp);
>   	if (!intel_dp)
> -	        goto err_priv;
> +		goto err_priv;
>   
>   	if ((output_reg == DP_C) && cdv_intel_dpc_is_edp(dev))
>   		type = DRM_MODE_CONNECTOR_eDP;
> @@ -1976,7 +1977,7 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev
>   
>   	if (type == DRM_MODE_CONNECTOR_DisplayPort)
>   		gma_encoder->type = INTEL_OUTPUT_DISPLAYPORT;
> -        else
> +	else
>   		gma_encoder->type = INTEL_OUTPUT_EDP;
>   
>   
> @@ -2006,18 +2007,18 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev
>   	cdv_disable_intel_clock_gating(dev);
>   
>   	cdv_intel_dp_i2c_init(gma_connector, gma_encoder, name);
> -        /* FIXME:fail check */
> +	/* FIXME:fail check */
>   	cdv_intel_dp_add_properties(connector);
>   
>   	if (is_edp(gma_encoder)) {
>   		int ret;
>   		struct edp_power_seq cur;
> -                u32 pp_on, pp_off, pp_div;
> +		u32 pp_on, pp_off, pp_div;
>   		u32 pwm_ctrl;
>   
>   		pp_on = REG_READ(PP_CONTROL);
>   		pp_on &= ~PANEL_UNLOCK_MASK;
> -	        pp_on |= PANEL_UNLOCK_REGS;
> +		pp_on |= PANEL_UNLOCK_REGS;
>   
>   		REG_WRITE(PP_CONTROL, pp_on);
>   
> @@ -2025,42 +2026,42 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev
>   		pwm_ctrl |= PWM_PIPE_B;
>   		REG_WRITE(BLC_PWM_CTL2, pwm_ctrl);
>   
> -                pp_on = REG_READ(PP_ON_DELAYS);
> -                pp_off = REG_READ(PP_OFF_DELAYS);
> -                pp_div = REG_READ(PP_DIVISOR);
> +		pp_on = REG_READ(PP_ON_DELAYS);
> +		pp_off = REG_READ(PP_OFF_DELAYS);
> +		pp_div = REG_READ(PP_DIVISOR);
>   
>   		/* Pull timing values out of registers */
> -                cur.t1_t3 = (pp_on & PANEL_POWER_UP_DELAY_MASK) >>
> -                        PANEL_POWER_UP_DELAY_SHIFT;
> +		cur.t1_t3 = (pp_on & PANEL_POWER_UP_DELAY_MASK) >>
> +			    PANEL_POWER_UP_DELAY_SHIFT;
>   
> -                cur.t8 = (pp_on & PANEL_LIGHT_ON_DELAY_MASK) >>
> -                        PANEL_LIGHT_ON_DELAY_SHIFT;
> +		cur.t8 = (pp_on & PANEL_LIGHT_ON_DELAY_MASK) >>
> +			 PANEL_LIGHT_ON_DELAY_SHIFT;
>   
> -                cur.t9 = (pp_off & PANEL_LIGHT_OFF_DELAY_MASK) >>
> -                        PANEL_LIGHT_OFF_DELAY_SHIFT;
> +		cur.t9 = (pp_off & PANEL_LIGHT_OFF_DELAY_MASK) >>
> +			 PANEL_LIGHT_OFF_DELAY_SHIFT;
>   
> -                cur.t10 = (pp_off & PANEL_POWER_DOWN_DELAY_MASK) >>
> -                        PANEL_POWER_DOWN_DELAY_SHIFT;
> +		cur.t10 = (pp_off & PANEL_POWER_DOWN_DELAY_MASK) >>
> +			  PANEL_POWER_DOWN_DELAY_SHIFT;
>   
> -                cur.t11_t12 = ((pp_div & PANEL_POWER_CYCLE_DELAY_MASK) >>
> -                               PANEL_POWER_CYCLE_DELAY_SHIFT);
> +		cur.t11_t12 = ((pp_div & PANEL_POWER_CYCLE_DELAY_MASK) >>
> +			      PANEL_POWER_CYCLE_DELAY_SHIFT);
>   
> -                DRM_DEBUG_KMS("cur t1_t3 %d t8 %d t9 %d t10 %d t11_t12 %d\n",
> -                              cur.t1_t3, cur.t8, cur.t9, cur.t10, cur.t11_t12);
> +		DRM_DEBUG_KMS("cur t1_t3 %d t8 %d t9 %d t10 %d t11_t12 %d\n",
> +			      cur.t1_t3, cur.t8, cur.t9, cur.t10, cur.t11_t12);
>   
>   
>   		intel_dp->panel_power_up_delay = cur.t1_t3 / 10;
> -                intel_dp->backlight_on_delay = cur.t8 / 10;
> -                intel_dp->backlight_off_delay = cur.t9 / 10;
> -                intel_dp->panel_power_down_delay = cur.t10 / 10;
> -                intel_dp->panel_power_cycle_delay = (cur.t11_t12 - 1) * 100;
> +		intel_dp->backlight_on_delay = cur.t8 / 10;
> +		intel_dp->backlight_off_delay = cur.t9 / 10;
> +		intel_dp->panel_power_down_delay = cur.t10 / 10;
> +		intel_dp->panel_power_cycle_delay = (cur.t11_t12 - 1) * 100;
>   
> -                DRM_DEBUG_KMS("panel power up delay %d, power down delay %d, power cycle delay %d\n",
> -                              intel_dp->panel_power_up_delay, intel_dp->panel_power_down_delay,
> -                              intel_dp->panel_power_cycle_delay);
> +		DRM_DEBUG_KMS("panel power up delay %d, power down delay %d, power cycle delay %d\n",
> +			      intel_dp->panel_power_up_delay, intel_dp->panel_power_down_delay,
> +			      intel_dp->panel_power_cycle_delay);
>   
> -                DRM_DEBUG_KMS("backlight on delay %d, off delay %d\n",
> -                              intel_dp->backlight_on_delay, intel_dp->backlight_off_delay);
> +		DRM_DEBUG_KMS("backlight on delay %d, off delay %d\n",
> +			      intel_dp->backlight_on_delay, intel_dp->backlight_off_delay);
>   
>   
>   		cdv_intel_edp_panel_vdd_on(gma_encoder);
> @@ -2075,7 +2076,7 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev
>   			cdv_intel_dp_destroy(connector);
>   			goto err_connector;
>   		} else {
> -        		DRM_DEBUG_KMS("DPCD: Rev=%x LN_Rate=%x LN_CNT=%x LN_DOWNSP=%x\n",
> +			DRM_DEBUG_KMS("DPCD: Rev=%x LN_Rate=%x LN_CNT=%x LN_DOWNSP=%x\n",
>   				intel_dp->dpcd[0], intel_dp->dpcd[1],
>   				intel_dp->dpcd[2], intel_dp->dpcd[3]);
>   
> @@ -2083,7 +2084,7 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev
>   		/* The CDV reference driver moves pnale backlight setup into the displays that
>   		   have a backlight: this is a good idea and one we should probably adopt, however
>   		   we need to migrate all the drivers before we can do that */
> -                /*cdv_intel_panel_setup_backlight(dev); */
> +		/*cdv_intel_panel_setup_backlight(dev); */
>   	}
>   	return;
>   
>
> ---
> base-commit: e2a6e04d045a56c6dc61e1eb9e2a6d7cf86512cd
> change-id: 20260623-cdv_intel_dp_indentation-bac45d43abcb
>
> Best regards,

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)



      reply	other threads:[~2026-07-17  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23 19:56 Diogo Silva
2026-07-17  7:51 ` Thomas Zimmermann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45f2c37d-0318-46e9-9b55-c840cffdafec@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@gmail.com \
    --cc=diogompaissilva@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=patrik.r.jakobsson@gmail.com \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®