Skip to contentSkip to conversation

drm/vc4: Fix build error with undefined label

PATCH In review Qingqing Zhuo 4 participants 11 messages Mar 8, 2023

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/vc4: Fix build error with undefined label

[Why]
drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_bind’:
drivers/gpu/drm/vc4/vc4_hdmi.c:3448:17: error: label ‘err_disable_runtime_pm’ used but not defined

[How]
update err_disable_runtime_pm to err_put_runtime_pm.

---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
index 9e145690c480..edf882360d24 100644
@@ -3445,7 +3445,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
 	 */
 	ret = pm_runtime_resume_and_get(dev);
 	if (ret)
-		goto err_disable_runtime_pm;
+		goto err_put_runtime_pm;
 
 	if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
 	     of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1")) &&
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 drm/amd/amdkfd: Fix build error with unmatched argument type

[Why]
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c: In function ‘svm_migrate_copy_to_vram’:
./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:35:21:
error: format ‘%lx’ expects argument of type ‘long unsigned int’,
but argument 6 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]
35 | #define pr_fmt(fmt) "amdgpu: " fmt

      |                     ^~~~~~~~~~

[How]
use %llx instead of %lx for ttm_res_offset.

Fixes d5db9d377c021 ("drm/amdkfd: Fix BO offset for multi-VMA page migration")
Cc Xiaogang Chen <[email protected]>
Cc Felix Kuehling <[email protected]>
---
 drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +1 -1
index 373cd7b0e1ca..fd54a00e7229 100644
@@ -304,7 +304,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
 	uint64_t i, j;
 	int r;
 
-	pr_debug("svms 0x%p [0x%lx 0x%lx 0x%lx]\n", prange->svms, prange->start,
+	pr_debug("svms 0x%p [0x%lx 0x%lx 0x%llx]\n", prange->svms, prange->start,
 		 prange->last, ttm_res_offset);
 
 	src = scratch;
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH 2/2] drm/amd/amdkfd: Fix build error with unmatched argument type

Quoted 11 lines · Qingqing Zhuo

[Why]
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c: In function ‘svm_migrate_copy_to_vram’:
./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:35:21:
error: format ‘%lx’ expects argument of type ‘long unsigned int’,
but argument 6 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]

    35 | #define pr_fmt(fmt) "amdgpu: " fmt
       |                     ^~~~~~~~~~

[How]
use %llx instead of %lx for ttm_res_offset.

Quoted 7 lines
Fixes d5db9d377c021 ("drm/amdkfd: Fix BO offset for multi-VMA page migration")
Cc Xiaogang Chen <[email protected]>
Cc Felix Kuehling <[email protected]>

---

I believe this has already been fixed as of commit 271acc541327 ("drm/amdkfd: fix warning in SVM debug statement"), in amd-staging-drm-next.

Quoted 16 lines
  drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +1 -1
index 373cd7b0e1ca..fd54a00e7229 100644
@@ -304,7 +304,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
  	uint64_t i, j;
  	int r;
 
-	pr_debug("svms 0x%p [0x%lx 0x%lx 0x%lx]\n", prange->svms, prange->start,
+	pr_debug("svms 0x%p [0x%lx 0x%lx 0x%llx]\n", prange->svms, prange->start,
  		 prange->last, ttm_res_offset);
 
  	src = scratch;
Signature · 1 line
Hamza
#3 lore raw

RE: [PATCH 2/2] drm/amd/amdkfd: Fix build error with unmatched argument type

[AMD Official Use Only - General]

Quoted 15 lines · Qingqing Zhuo

[Why]
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c: In function ‘svm_migrate_copy_to_vram’:
./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:35:21:
error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]

    35 | #define pr_fmt(fmt) "amdgpu: " fmt
       |                     ^~~~~~~~~~

[How]
use %llx instead of %lx for ttm_res_offset.

Fixes d5db9d377c021 ("drm/amdkfd: Fix BO offset for multi-VMA page

migration")

Quoted 7 lines
Cc Xiaogang Chen <[email protected]>
Cc Felix Kuehling <[email protected]>

---

I believe this has already been fixed as of commit 271acc541327 ("drm/amdkfd: fix warning in SVM debug statement"), in amd-staging-drm-next.

Thanks for sharing it. Please ignore this patch then.

Quoted 9 lines
  drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +0 -0
index 373cd7b0e1ca..fd54a00e7229 100644

drivers/gpu/drm/amd/amdkfd/kfd_migrate.c svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange, · line 310

Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +2 -1
@@ -304,7 +304,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
  	uint64_t i, j;
  	int r;
 
-	pr_debug("svms 0x%p [0x%lx 0x%lx 0x%lx]\n", prange->svms, prange->start,
+	pr_debug("svms 0x%p [0x%lx 0x%lx 0x%llx]\n", prange->svms, 
+prange->start,
  		 prange->last, ttm_res_offset);
 
  	src = scratch;

--
Lillian

#4 lore raw
In reply to Qingqing Zhuo

+ vc4 maintainers

Quoted 25 lines · Qingqing Zhuo

[Why]
drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_bind’:
drivers/gpu/drm/vc4/vc4_hdmi.c:3448:17: error: label ‘err_disable_runtime_pm’ used but not defined

[How]
update err_disable_runtime_pm to err_put_runtime_pm.

---
  drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
index 9e145690c480..edf882360d24 100644
@@ -3445,7 +3445,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
  	 */
  	ret = pm_runtime_resume_and_get(dev);
  	if (ret)
-		goto err_disable_runtime_pm;
+		goto err_put_runtime_pm;
 
  	if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
  	     of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1")) &&
Signature · 1 line
Hamza
#5 lore raw

Hi,

Quoted 15 lines · Hamza Mahfooz

+ vc4 maintainers

Quoted 12 lines · Qingqing Zhuo

[Why]
drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_bind’:
drivers/gpu/drm/vc4/vc4_hdmi.c:3448:17: error: label ‘err_disable_runtime_pm’ used but not defined

[How]
update err_disable_runtime_pm to err_put_runtime_pm.

---
  drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines

drivers/gpu/drm/vc4/vc4_hdmi.c static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) · line 3450

Quoted 12 lines
drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
index 9e145690c480..edf882360d24 100644
@@ -3445,7 +3445,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
  	 */
  	ret = pm_runtime_resume_and_get(dev);
  	if (ret)
-		goto err_disable_runtime_pm;
+		goto err_put_runtime_pm;
  	if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
  	     of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1")) &&

The current drm-misc-next branch doesn't have that context at all. What tree is this based on?

Maxime

#6 lore raw

[AMD Official Use Only - General]

Quoted 1 line

Hi,

Quoted 33 lines · Hamza Mahfooz

+ vc4 maintainers

Quoted 26 lines · Qingqing Zhuo

[Why]
drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_bind’:
drivers/gpu/drm/vc4/vc4_hdmi.c:3448:17: error: label ‘err_disable_runtime_pm’ used but not defined

[How]
update err_disable_runtime_pm to err_put_runtime_pm.

---
  drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/vc4/vc4_hdmi.c index 9e145690c480..edf882360d24 100644

drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
@@ -3445,7 +3445,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
  	 */
  	ret = pm_runtime_resume_and_get(dev);
  	if (ret)
-		goto err_disable_runtime_pm;
+		goto err_put_runtime_pm;
  	if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
  	     of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1")) 
Quoted 1 line

&&

The current drm-misc-next branch doesn't have that context at all. What tree is this based on?

Quoted 1 line

Maxime

Hi Maxime,

This is for amd-staging-drm-next.

Thanks,
Lillian

#7 lore raw
Quoted 38 lines · Qingqing (Lillian)

[AMD Official Use Only - General]

Quoted 1 line

Hi,

Quoted 16 lines · Hamza Mahfooz

+ vc4 maintainers

Quoted 13 lines · Qingqing Zhuo

[Why]
drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_bind’:
drivers/gpu/drm/vc4/vc4_hdmi.c:3448:17: error: label ‘err_disable_runtime_pm’ used but not defined

[How]
update err_disable_runtime_pm to err_put_runtime_pm.

---
  drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
Quoted 13 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/vc4/vc4_hdmi.c index 9e145690c480..edf882360d24 100644

drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
@@ -3445,7 +3445,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
  	 */
  	ret = pm_runtime_resume_and_get(dev);
  	if (ret)
-		goto err_disable_runtime_pm;
+		goto err_put_runtime_pm;
  	if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
  	     of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1")) 
Quoted 1 line

&&

The current drm-misc-next branch doesn't have that context at all. What tree is this based on?

Quoted 1 line

This is for amd-staging-drm-next.

I don't get it, why is there a vc4 patch in an AMD tree?

Maxime

#8 lore raw
Quoted 38 lines · Maxime Ripard
Quoted 36 lines · Qingqing (Lillian)

[AMD Official Use Only - General]

Quoted 1 line

Hi,

Quoted 30 lines · Hamza Mahfooz

+ vc4 maintainers

Quoted 27 lines · Qingqing Zhuo

[Why]
drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_bind’:
drivers/gpu/drm/vc4/vc4_hdmi.c:3448:17: error: label ‘err_disable_runtime_pm’ used but not defined

[How]
update err_disable_runtime_pm to err_put_runtime_pm.

---
  drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/vc4/vc4_hdmi.c index 9e145690c480..edf882360d24 100644

drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
@@ -3445,7 +3445,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
           */
          ret = pm_runtime_resume_and_get(dev);
          if (ret)
-         goto err_disable_runtime_pm;
+         goto err_put_runtime_pm;
          if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
               of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1"))

&&

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

The current drm-misc-next branch doesn't have that context at all. What tree is this based on?

This is for amd-staging-drm-next.

I don't get it, why is there a vc4 patch in an AMD tree?

There isn't. it just happens to have an vc4 driver with this issue when we branched it. Lillian, please double check drm-next or linux-next for non-AMD drivers

Alex

#9 lore raw
Quoted 41 lines · Alex Deucher
Quoted 40 lines · Maxime Ripard
Quoted 38 lines · Qingqing (Lillian)

[AMD Official Use Only - General]

Quoted 1 line

Hi,

Quoted 32 lines · Hamza Mahfooz

+ vc4 maintainers

Quoted 26 lines · Qingqing Zhuo

[Why]
drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_bind’:
drivers/gpu/drm/vc4/vc4_hdmi.c:3448:17: error: label ‘err_disable_runtime_pm’ used but not defined

[How]
update err_disable_runtime_pm to err_put_runtime_pm.

---
   drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/vc4/vc4_hdmi.c index 9e145690c480..edf882360d24 100644

drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
@@ -3445,7 +3445,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
            */
           ret = pm_runtime_resume_and_get(dev);
           if (ret)
-         goto err_disable_runtime_pm;
+         goto err_put_runtime_pm;
           if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
                of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1"))
Quoted 1 line

&&

The current drm-misc-next branch doesn't have that context at all. What tree is this based on?

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

This is for amd-staging-drm-next.

I don't get it, why is there a vc4 patch in an AMD tree?

There isn't. it just happens to have an vc4 driver with this issue when we branched it. Lillian, please double check drm-next or linux-next for non-AMD drivers

I think we can cherry pick commit 932d860f4672 ("drm/vc4: hdmi: Switch to devm_pm_runtime_enable") to resolve the compile issue, that Lillian is observing.

Quoted 2 lines

Alex

Signature · 1 line
Hamza
#10 lore raw
In reply to Alex Deucher

[AMD Official Use Only - General]

Quoted 39 lines · Maxime Ripard
Quoted 37 lines · Qingqing (Lillian)

[AMD Official Use Only - General]

Quoted 1 line

Hi,

Quoted 31 lines · Hamza Mahfooz

+ vc4 maintainers

Quoted 28 lines · Qingqing Zhuo

[Why]
drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_bind’:
drivers/gpu/drm/vc4/vc4_hdmi.c:3448:17: error: label ‘err_disable_runtime_pm’ used but not defined

[How]
update err_disable_runtime_pm to err_put_runtime_pm.

---
  drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/vc4/vc4_hdmi.c index
9e145690c480..edf882360d24
100644

drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
@@ -3445,7 +3445,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
           */
          ret = pm_runtime_resume_and_get(dev);
          if (ret)
-         goto err_disable_runtime_pm;
+         goto err_put_runtime_pm;
          if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
               of_device_is_compatible(dev->of_node, 

"brcm,bcm2711-hdmi1")) &&

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

The current drm-misc-next branch doesn't have that context at all. What tree is this based on?

This is for amd-staging-drm-next.

I don't get it, why is there a vc4 patch in an AMD tree?

There isn't. it just happens to have an vc4 driver with this issue when we branched it. Lillian, please double check drm-next or linux-next for non-AMD drivers

Thanks for letting me know and apologies for the confusion! Will for sure do in the future.

Thanks,
Lillian