2020-08-18 06:54:59

by Tian Tao

[permalink] [raw]
Subject: [PATCH drm/hisilicon 0/4] Use drv_err instead of DRM_ERROR in hibmc driver

patch #1 is using the drv_err instead of DRM_ERROR in hibmc_ttm.c
patch #2 is using the drv_err instead of DRM_ERROR in hibmc_drm_vdac.c
patch #3 is using the drv_err and drm_dbg_atomic instead of DRM_ERROR
and DRM_DEBUG_ATOMIC in hibmc_drm_de.c
patch #4 is using the drv_err and drm_warn instead of DRM_ERROR and
DRM_WARN in hibmc_drm_drv.c

Tian Tao (4):
drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_ttm
drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_vdac
drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_de
drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_drv

drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 14 +++++++-------
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 24 ++++++++++++------------
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 4 ++--
drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 2 +-
4 files changed, 22 insertions(+), 22 deletions(-)

--
2.7.4


2020-08-18 06:55:08

by Tian Tao

[permalink] [raw]
Subject: [PATCH drm/hisilicon 1/4] drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_ttm

Use drv_err instead of DRM_ERROR in hibmc_ttm.

Signed-off-by: Tian Tao <[email protected]>
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c
index 322bd54..602ece1 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c
@@ -32,7 +32,7 @@ int hibmc_mm_init(struct hibmc_drm_private *hibmc)
hibmc->fb_size);
if (IS_ERR(vmm)) {
ret = PTR_ERR(vmm);
- DRM_ERROR("Error initializing VRAM MM; %d\n", ret);
+ drm_err(dev, "Error initializing VRAM MM; %d\n", ret);
return ret;
}

--
2.7.4

2020-08-18 06:56:33

by Tian Tao

[permalink] [raw]
Subject: [PATCH drm/hisilicon 2/4] drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_vdac

Use drv_err instead of DRM_ERROR in hibmc_drm_vdac

Signed-off-by: Tian Tao <[email protected]>
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
index ed12f61..376a05d 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
@@ -85,7 +85,7 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
ret = drm_encoder_init(dev, encoder, &hibmc_encoder_funcs,
DRM_MODE_ENCODER_DAC, NULL);
if (ret) {
- DRM_ERROR("failed to init encoder: %d\n", ret);
+ drm_err(dev, "failed to init encoder: %d\n", ret);
return ret;
}

@@ -94,7 +94,7 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
ret = drm_connector_init(dev, connector, &hibmc_connector_funcs,
DRM_MODE_CONNECTOR_VGA);
if (ret) {
- DRM_ERROR("failed to init connector: %d\n", ret);
+ drm_err(dev, "failed to init connector: %d\n", ret);
return ret;
}
drm_connector_helper_add(connector, &hibmc_connector_helper_funcs);
--
2.7.4

2020-08-18 06:57:07

by Tian Tao

[permalink] [raw]
Subject: [PATCH drm/hisilicon 4/4] drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_drv

Use drv_err instead of DRM_ERROR in hibmc_drm_drv

Signed-off-by: Tian Tao <[email protected]>
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index 2b4f821..e3ffa1f 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -98,13 +98,13 @@ static int hibmc_kms_init(struct hibmc_drm_private *priv)

ret = hibmc_de_init(priv);
if (ret) {
- DRM_ERROR("failed to init de: %d\n", ret);
+ drm_err(priv->dev, "failed to init de: %d\n", ret);
return ret;
}

ret = hibmc_vdac_init(priv);
if (ret) {
- DRM_ERROR("failed to init vdac: %d\n", ret);
+ drm_err(priv->dev, "failed to init vdac: %d\n", ret);
return ret;
}

@@ -212,7 +212,7 @@ static int hibmc_hw_map(struct hibmc_drm_private *priv)
iosize = pci_resource_len(pdev, 1);
priv->mmio = devm_ioremap(dev->dev, ioaddr, iosize);
if (!priv->mmio) {
- DRM_ERROR("Cannot map mmio region\n");
+ drm_err(dev, "Cannot map mmio region\n");
return -ENOMEM;
}

@@ -220,7 +220,7 @@ static int hibmc_hw_map(struct hibmc_drm_private *priv)
size = pci_resource_len(pdev, 0);
priv->fb_map = devm_ioremap(dev->dev, addr, size);
if (!priv->fb_map) {
- DRM_ERROR("Cannot map framebuffer\n");
+ drm_err(dev, "Cannot map framebuffer\n");
return -ENOMEM;
}
priv->fb_base = addr;
@@ -265,7 +265,7 @@ static int hibmc_load(struct drm_device *dev)

priv = drmm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv) {
- DRM_ERROR("no memory to allocate for hibmc_drm_private\n");
+ drm_err(dev, "no memory to allocate for hibmc_drm_private\n");
return -ENOMEM;
}
dev->dev_private = priv;
@@ -285,17 +285,17 @@ static int hibmc_load(struct drm_device *dev)

ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
if (ret) {
- DRM_ERROR("failed to initialize vblank: %d\n", ret);
+ drm_err(dev, "failed to initialize vblank: %d\n", ret);
goto err;
}

ret = pci_enable_msi(dev->pdev);
if (ret) {
- DRM_WARN("enabling MSI failed: %d\n", ret);
+ drm_warn(dev, "enabling MSI failed: %d\n", ret);
} else {
ret = drm_irq_install(dev, dev->pdev->irq);
if (ret)
- DRM_WARN("install irq failed: %d\n", ret);
+ drm_warn(dev, "install irq failed: %d\n", ret);
}

/* reset all the states of crtc/plane/encoder/connector */
@@ -322,7 +322,7 @@ static int hibmc_pci_probe(struct pci_dev *pdev,

dev = drm_dev_alloc(&hibmc_driver, &pdev->dev);
if (IS_ERR(dev)) {
- DRM_ERROR("failed to allocate drm_device\n");
+ drm_err(dev, "failed to allocate drm_device\n");
return PTR_ERR(dev);
}

@@ -331,19 +331,19 @@ static int hibmc_pci_probe(struct pci_dev *pdev,

ret = pci_enable_device(pdev);
if (ret) {
- DRM_ERROR("failed to enable pci device: %d\n", ret);
+ drm_err(dev, "failed to enable pci device: %d\n", ret);
goto err_free;
}

ret = hibmc_load(dev);
if (ret) {
- DRM_ERROR("failed to load hibmc: %d\n", ret);
+ drm_err(dev, "failed to load hibmc: %d\n", ret);
goto err_disable;
}

ret = drm_dev_register(dev, 0);
if (ret) {
- DRM_ERROR("failed to register drv for userspace access: %d\n",
+ drm_err(dev, "failed to register drv for userspace access: %d\n",
ret);
goto err_unload;
}
--
2.7.4

2020-08-18 06:58:19

by Tian Tao

[permalink] [raw]
Subject: [PATCH drm/hisilicon 3/4] drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_de

Use drv_err instead of DRM_ERROR in hibmc_drm_de

Signed-off-by: Tian Tao <[email protected]>
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
index d9062a3..4d57ec6 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
@@ -71,12 +71,12 @@ static int hibmc_plane_atomic_check(struct drm_plane *plane,
return PTR_ERR(crtc_state);

if (src_w != state->crtc_w || src_h != state->crtc_h) {
- DRM_DEBUG_ATOMIC("scale not support\n");
+ drm_dbg_atomic(plane->dev, "scale not support\n");
return -EINVAL;
}

if (state->crtc_x < 0 || state->crtc_y < 0) {
- DRM_DEBUG_ATOMIC("crtc_x/y of drm_plane state is invalid\n");
+ drm_dbg_atomic(plane->dev, "crtc_x/y of drm_plane state is invalid\n");
return -EINVAL;
}

@@ -87,12 +87,12 @@ static int hibmc_plane_atomic_check(struct drm_plane *plane,
crtc_state->adjusted_mode.hdisplay ||
state->crtc_y + state->crtc_h >
crtc_state->adjusted_mode.vdisplay) {
- DRM_DEBUG_ATOMIC("visible portion of plane is invalid\n");
+ drm_dbg_atomic(plane->dev, "visible portion of plane is invalid\n");
return -EINVAL;
}

if (state->fb->pitches[0] % 128 != 0) {
- DRM_DEBUG_ATOMIC("wrong stride with 128-byte aligned\n");
+ drm_dbg_atomic(plane->dev, "wrong stride with 128-byte aligned\n");
return -EINVAL;
}
return 0;
@@ -515,7 +515,7 @@ int hibmc_de_init(struct hibmc_drm_private *priv)
NULL);

if (ret) {
- DRM_ERROR("failed to init plane: %d\n", ret);
+ drm_err(dev, "failed to init plane: %d\n", ret);
return ret;
}

@@ -524,13 +524,13 @@ int hibmc_de_init(struct hibmc_drm_private *priv)
ret = drm_crtc_init_with_planes(dev, crtc, plane,
NULL, &hibmc_crtc_funcs, NULL);
if (ret) {
- DRM_ERROR("failed to init crtc: %d\n", ret);
+ drm_err(dev, "failed to init crtc: %d\n", ret);
return ret;
}

ret = drm_mode_crtc_set_gamma_size(crtc, 256);
if (ret) {
- DRM_ERROR("failed to set gamma size: %d\n", ret);
+ drm_err(dev, "failed to set gamma size: %d\n", ret);
return ret;
}
drm_crtc_helper_add(crtc, &hibmc_crtc_helper_funcs);
--
2.7.4

2020-08-18 07:43:45

by Thomas Zimmermann

[permalink] [raw]
Subject: Re: [PATCH drm/hisilicon 0/4] Use drv_err instead of DRM_ERROR in hibmc driver

Hi

Am 18.08.20 um 08:51 schrieb Tian Tao:
> patch #1 is using the drv_err instead of DRM_ERROR in hibmc_ttm.c
> patch #2 is using the drv_err instead of DRM_ERROR in hibmc_drm_vdac.c
> patch #3 is using the drv_err and drm_dbg_atomic instead of DRM_ERROR
> and DRM_DEBUG_ATOMIC in hibmc_drm_de.c
> patch #4 is using the drv_err and drm_warn instead of DRM_ERROR and
> DRM_WARN in hibmc_drm_drv.c
>
> Tian Tao (4):
> drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_ttm
> drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_vdac
> drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_de
> drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_drv

Series is

Reviewed-by: Thomas Zimmermann <[email protected]>

>
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 14 +++++++-------
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 24 ++++++++++++------------
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 4 ++--
> drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 2 +-
> 4 files changed, 22 insertions(+), 22 deletions(-)
>

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


Attachments:
signature.asc (527.00 B)
OpenPGP digital signature

2020-08-18 10:52:34

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH drm/hisilicon 0/4] Use drv_err instead of DRM_ERROR in hibmc driver

On Tue, Aug 18, 2020 at 02:51:40PM +0800, Tian Tao wrote:
> patch #1 is using the drv_err instead of DRM_ERROR in hibmc_ttm.c
> patch #2 is using the drv_err instead of DRM_ERROR in hibmc_drm_vdac.c
> patch #3 is using the drv_err and drm_dbg_atomic instead of DRM_ERROR
> and DRM_DEBUG_ATOMIC in hibmc_drm_de.c
> patch #4 is using the drv_err and drm_warn instead of DRM_ERROR and
> DRM_WARN in hibmc_drm_drv.c
>
> Tian Tao (4):
> drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_ttm
> drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_vdac
> drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_de
> drm/hisilicon: Use drv_err instead of DRM_ERROR in hibmc_drm_drv

Hi Tian.

Code looks fine, but subjects says "drv_err", where code uses "drm_err".
This confused me, mind fixing the $subject before applying

Sam

>
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 14 +++++++-------
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 24 ++++++++++++------------
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 4 ++--
> drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 2 +-
> 4 files changed, 22 insertions(+), 22 deletions(-)
>
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel