Skip to contentSkip to conversation

drm/amdgpu/vcn: remove unnecessary included headers

PATCH In review Leo Liu 2 participants 6 messages Dec 16, 2019

Subsystems (2)
lore
Share & tools
lore

Leo Liu

author
#0 lore raw

PATCH 1/1 drm/amdgpu/vcn: remove unnecessary included headers

Esp. VCN1.0 headers should not be here

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -7
index e522025430c7..371f55de42dc 100644
@@ -25,19 +25,12 @@
  */
 
 #include <linux/firmware.h>
-#include <linux/module.h>
 #include <linux/pci.h>
 
-#include <drm/drm.h>
-
 #include "amdgpu.h"
 #include "amdgpu_pm.h"
 #include "amdgpu_vcn.h"
 #include "soc15d.h"
-#include "soc15_common.h"
-
-#include "vcn/vcn_1_0_offset.h"
-#include "vcn/vcn_1_0_sh_mask.h"
 
 /* Firmware Names */
 #define FIRMWARE_RAVEN		"amdgpu/raven_vcn.bin"
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw
Quoted 13 lines · Leo Liu

Esp. VCN1.0 headers should not be here

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -0
index e522025430c7..371f55de42dc 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c line 28

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -1
@@ -25,19 +25,12 @@
  */
 
 #include <linux/firmware.h>
-#include <linux/module.h>

Don't we still need module.h for MODULE_FIRMWARE()?

Alex

Quoted 18 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -7
 #include <linux/pci.h>
 
-#include <drm/drm.h>
-
 #include "amdgpu.h"
 #include "amdgpu_pm.h"
 #include "amdgpu_vcn.h"
 #include "soc15d.h"
-#include "soc15_common.h"
-
-#include "vcn/vcn_1_0_offset.h"
-#include "vcn/vcn_1_0_sh_mask.h"
 
 /* Firmware Names */
 #define FIRMWARE_RAVEN         "amdgpu/raven_vcn.bin"
--

2.17.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#2 lore raw
Quoted 15 lines · Alex Deucher
Quoted 14 lines · Leo Liu

Esp. VCN1.0 headers should not be here

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 7 -------
  1 file changed, 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -0
index e522025430c7..371f55de42dc 100644
@@ -25,19 +25,12 @@
   */
 
Quoted 3 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c line 28

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -1
  #include <linux/firmware.h>
-#include <linux/module.h>

Don't we still need module.h for MODULE_FIRMWARE()?

It's got built okay by removing it. I will keep it anyway.

Regards,
Leo

Quoted 21 lines

Alex

Quoted 18 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -7
  #include <linux/pci.h>
 
-#include <drm/drm.h>
-
  #include "amdgpu.h"
  #include "amdgpu_pm.h"
  #include "amdgpu_vcn.h"
  #include "soc15d.h"
-#include "soc15_common.h"
-
-#include "vcn/vcn_1_0_offset.h"
-#include "vcn/vcn_1_0_sh_mask.h"
 
  /* Firmware Names */
  #define FIRMWARE_RAVEN         "amdgpu/raven_vcn.bin"
--

2.17.1

Quoted 4 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cleo.liu%40amd.com%7C471b86fd37a94fdefe8008d7824612b5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637121109780682361&amp;sdata=7rC8gPrHsi5xa8Zsis%2B%2FXH0URESxBb6AQaMgppVGDJs%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#3 lore raw

Hi Alex,

I searched and found why it get built okay:

amdgpu.h includes amdgpu_mode.h, and that include linux/i2c.h.

And linux/i2c.h includes linux/acpi.h and that includes linux/modules.h.

Tested it by commenting out linux/modules.h from linux/acpi.h, then the build for amdgpu.ko would fail at the MODULE_FIRMWARE for VCN.

So in order to keep it consistent, and I will send v2 to keep <linux/modules.h>

Regards,

Leo

Quoted 49 lines · Leo Liu
Quoted 15 lines · Alex Deucher
Quoted 14 lines · Leo Liu

Esp. VCN1.0 headers should not be here

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 7 -------

  1 file changed, 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -0
index e522025430c7..371f55de42dc 100644
@@ -25,19 +25,12 @@
    */
 
Quoted 3 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c line 28

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -1
   #include <linux/firmware.h>
-#include <linux/module.h>

Don't we still need module.h for MODULE_FIRMWARE()?

It's got built okay by removing it. I will keep it anyway.

Regards,
Leo

Quoted 21 lines

Alex

Quoted 18 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -6
   #include <linux/pci.h>
 
-#include <drm/drm.h>
-
   #include "amdgpu.h"
   #include "amdgpu_pm.h"
   #include "amdgpu_vcn.h"
   #include "soc15d.h"
-#include "soc15_common.h"
-
-#include "vcn/vcn_1_0_offset.h"
-#include "vcn/vcn_1_0_sh_mask.h"
 
   /* Firmware Names */
   #define FIRMWARE_RAVEN         "amdgpu/raven_vcn.bin"
Signature · 1 line
2.17.1
Quoted 10 lines
Quoted 5 lines
Quoted 5 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cleo.liu%40amd.com%7C041e573a661b498216ea08d782481d8e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637121119112744072&amp;sdata=TtjVEgl%2BB2sprSvHOJvCpZsxXD5jw9WSreusaDoeKmU%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cleo.liu%40amd.com%7C041e573a661b498216ea08d782481d8e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637121119112744072&amp;sdata=TtjVEgl%2BB2sprSvHOJvCpZsxXD5jw9WSreusaDoeKmU%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#4 lore raw

PATCH 1/1 drm/amdgpu/vcn: remove unnecessary included headers

In reply to Leo Liu

Esp. VCN1.0 headers should not be here

v2: add back the <linux/module.h> to keep consistent.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -6
index e522025430c7..623b9f9ef1ea 100644
@@ -28,16 +28,10 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 
-#include <drm/drm.h>
-
 #include "amdgpu.h"
 #include "amdgpu_pm.h"
 #include "amdgpu_vcn.h"
 #include "soc15d.h"
-#include "soc15_common.h"
-
-#include "vcn/vcn_1_0_offset.h"
-#include "vcn/vcn_1_0_sh_mask.h"
 
 /* Firmware Names */
 #define FIRMWARE_RAVEN		"amdgpu/raven_vcn.bin"
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#5 lore raw
Quoted 6 lines · Leo Liu

Esp. VCN1.0 headers should not be here

v2: add back the <linux/module.h> to keep consistent.

Quoted 28 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -7
index e522025430c7..623b9f9ef1ea 100644
@@ -28,16 +28,10 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 
-#include <drm/drm.h>
-
 #include "amdgpu.h"
 #include "amdgpu_pm.h"
 #include "amdgpu_vcn.h"
 #include "soc15d.h"
-#include "soc15_common.h"
-
-#include "vcn/vcn_1_0_offset.h"
-#include "vcn/vcn_1_0_sh_mask.h"
 
 /* Firmware Names */
 #define FIRMWARE_RAVEN         "amdgpu/raven_vcn.bin"
--

2.17.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx