Commit 110e6f26 authored by Dave Airlie's avatar Dave Airlie Committed by Alex Deucher

drm/amd: make a type-safe cgs_device struct. (v2)

This is just a type-safety things to avoid everyone taking void *,
it doesn't change anything.

v2: agd5f: split out the dal changes into a separate patch.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c0365541
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#define mmACP_AZALIA_I2S_SELECT 0x51d4 #define mmACP_AZALIA_I2S_SELECT 0x51d4
int amd_acp_hw_init(void *cgs_device, int amd_acp_hw_init(struct cgs_device *cgs_device,
unsigned acp_version_major, unsigned acp_version_minor) unsigned acp_version_major, unsigned acp_version_minor)
{ {
unsigned int acp_mode = ACP_MODE_I2S; unsigned int acp_mode = ACP_MODE_I2S;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "cgs_linux.h" #include "cgs_linux.h"
#include "cgs_common.h" #include "cgs_common.h"
int amd_acp_hw_init(void *cgs_device, int amd_acp_hw_init(struct cgs_device *cgs_device,
unsigned acp_version_major, unsigned acp_version_minor); unsigned acp_version_major, unsigned acp_version_minor);
#endif /* _ACP_GFX_IF_H */ #endif /* _ACP_GFX_IF_H */
...@@ -1868,15 +1868,8 @@ struct amdgpu_atcs { ...@@ -1868,15 +1868,8 @@ struct amdgpu_atcs {
/* /*
* CGS * CGS
*/ */
void *amdgpu_cgs_create_device(struct amdgpu_device *adev); struct cgs_device *amdgpu_cgs_create_device(struct amdgpu_device *adev);
void amdgpu_cgs_destroy_device(void *cgs_device); void amdgpu_cgs_destroy_device(struct cgs_device *cgs_device);
/*
* CGS
*/
void *amdgpu_cgs_create_device(struct amdgpu_device *adev);
void amdgpu_cgs_destroy_device(void *cgs_device);
/* GPU virtualization */ /* GPU virtualization */
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
struct amdgpu_acp { struct amdgpu_acp {
struct device *parent; struct device *parent;
void *cgs_device; struct cgs_device *cgs_device;
struct amd_acp_private *private; struct amd_acp_private *private;
struct mfd_cell *acp_cell; struct mfd_cell *acp_cell;
struct resource *acp_res; struct resource *acp_res;
......
This diff is collapsed.
This diff is collapsed.
...@@ -66,7 +66,7 @@ typedef int (*cgs_irq_handler_func_t)(void *private_data, ...@@ -66,7 +66,7 @@ typedef int (*cgs_irq_handler_func_t)(void *private_data,
* *
* Return: 0 on success, -errno otherwise * Return: 0 on success, -errno otherwise
*/ */
typedef int (*cgs_add_irq_source_t)(void *cgs_device, unsigned src_id, typedef int (*cgs_add_irq_source_t)(struct cgs_device *cgs_device, unsigned src_id,
unsigned num_types, unsigned num_types,
cgs_irq_source_set_func_t set, cgs_irq_source_set_func_t set,
cgs_irq_handler_func_t handler, cgs_irq_handler_func_t handler,
...@@ -83,7 +83,7 @@ typedef int (*cgs_add_irq_source_t)(void *cgs_device, unsigned src_id, ...@@ -83,7 +83,7 @@ typedef int (*cgs_add_irq_source_t)(void *cgs_device, unsigned src_id,
* *
* Return: 0 on success, -errno otherwise * Return: 0 on success, -errno otherwise
*/ */
typedef int (*cgs_irq_get_t)(void *cgs_device, unsigned src_id, unsigned type); typedef int (*cgs_irq_get_t)(struct cgs_device *cgs_device, unsigned src_id, unsigned type);
/** /**
* cgs_irq_put() - Indicate IRQ source is no longer needed * cgs_irq_put() - Indicate IRQ source is no longer needed
...@@ -98,7 +98,7 @@ typedef int (*cgs_irq_get_t)(void *cgs_device, unsigned src_id, unsigned type); ...@@ -98,7 +98,7 @@ typedef int (*cgs_irq_get_t)(void *cgs_device, unsigned src_id, unsigned type);
* *
* Return: 0 on success, -errno otherwise * Return: 0 on success, -errno otherwise
*/ */
typedef int (*cgs_irq_put_t)(void *cgs_device, unsigned src_id, unsigned type); typedef int (*cgs_irq_put_t)(struct cgs_device *cgs_device, unsigned src_id, unsigned type);
struct cgs_os_ops { struct cgs_os_ops {
/* IRQ handling */ /* IRQ handling */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment