2022-04-25 07:12:47

by Samuel Holland

[permalink] [raw]
Subject: [PATCH v3 04/14] drm/sun4i: hdmi: Use more portable I/O helpers

readsb/writesb are unavailable on some architectures. In preparation for
removing the Kconfig architecture dependency, switch to the equivalent
but more portable ioread/write8_rep helpers.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Samuel Holland <[email protected]>
---

(no changes since v2)

Changes in v2:
- New patch: I/O helper portability

drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c
index b66fa27fe6ea..c7d7e9fff91c 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c
@@ -56,9 +56,9 @@ static int fifo_transfer(struct sun4i_hdmi *hdmi, u8 *buf, int len, bool read)
return -EIO;

if (read)
- readsb(hdmi->base + hdmi->variant->ddc_fifo_reg, buf, len);
+ ioread8_rep(hdmi->base + hdmi->variant->ddc_fifo_reg, buf, len);
else
- writesb(hdmi->base + hdmi->variant->ddc_fifo_reg, buf, len);
+ iowrite8_rep(hdmi->base + hdmi->variant->ddc_fifo_reg, buf, len);

/* Clear FIFO request bit by forcing a write to that bit */
regmap_field_force_write(hdmi->field_ddc_int_status,
--
2.35.1


2022-04-25 08:02:18

by Jernej Škrabec

[permalink] [raw]
Subject: Re: [PATCH v3 04/14] drm/sun4i: hdmi: Use more portable I/O helpers

Dne nedelja, 24. april 2022 ob 18:26:22 CEST je Samuel Holland napisal(a):
> readsb/writesb are unavailable on some architectures. In preparation for
> removing the Kconfig architecture dependency, switch to the equivalent
> but more portable ioread/write8_rep helpers.
>
> Reported-by: kernel test robot <[email protected]>
> Signed-off-by: Samuel Holland <[email protected]>

Reviewed-by: Jernej Skrabec <[email protected]>

Best regards,
Jernej Skrabec

> ---
>
> (no changes since v2)
>
> Changes in v2:
> - New patch: I/O helper portability
>
> drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c b/drivers/gpu/drm/sun4i/
sun4i_hdmi_i2c.c
> index b66fa27fe6ea..c7d7e9fff91c 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c
> @@ -56,9 +56,9 @@ static int fifo_transfer(struct sun4i_hdmi *hdmi, u8 *buf,
int len, bool read)
> return -EIO;
>
> if (read)
> - readsb(hdmi->base + hdmi->variant->ddc_fifo_reg, buf,
len);
> + ioread8_rep(hdmi->base + hdmi->variant->ddc_fifo_reg,
buf, len);
> else
> - writesb(hdmi->base + hdmi->variant->ddc_fifo_reg, buf,
len);
> + iowrite8_rep(hdmi->base + hdmi->variant->ddc_fifo_reg,
buf, len);
>
> /* Clear FIFO request bit by forcing a write to that bit */
> regmap_field_force_write(hdmi->field_ddc_int_status,
> --
> 2.35.1
>
>


2022-04-27 11:22:48

by Maxime Ripard

[permalink] [raw]
Subject: Re: (subset) [PATCH v3 04/14] drm/sun4i: hdmi: Use more portable I/O helpers

On Sun, 24 Apr 2022 11:26:22 -0500, Samuel Holland wrote:
> readsb/writesb are unavailable on some architectures. In preparation for
> removing the Kconfig architecture dependency, switch to the equivalent
> but more portable ioread/write8_rep helpers.
>
>

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime