drm/amd/display: Pass amdgpu_device instead of psp_context
authorBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Thu, 12 Dec 2019 21:28:23 +0000 (16:28 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Feb 2020 04:30:40 +0000 (23:30 -0500)
[Why]
We need this to create sysfs (followup patch)

[How]
Change the parameter

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h

index 279541517a99a3a733722f72c9fff84fd8d13b2b..d0ddbc9df26461ee0f92ea11ef789059fc9423df 100644 (file)
@@ -960,7 +960,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
 #ifdef CONFIG_DRM_AMD_DC_HDCP
        if (adev->asic_type >= CHIP_RAVEN) {
-               adev->dm.hdcp_workqueue = hdcp_create_workqueue(&adev->psp, &init_params.cp_psp, adev->dm.dc);
+               adev->dm.hdcp_workqueue = hdcp_create_workqueue(adev, &init_params.cp_psp, adev->dm.dc);
 
                if (!adev->dm.hdcp_workqueue)
                        DRM_ERROR("amdgpu: failed to initialize hdcp_workqueue.\n");
index 0acd3409dd6ce3599919391d0c12ffbddbefbf47..a269916f7dd6cfeccb173f2403fb63869152ae06 100644 (file)
@@ -338,7 +338,7 @@ static void update_config(void *handle, struct cp_psp_stream_config *config)
        hdcp_update_display(hdcp_work, link_index, aconnector, DRM_MODE_HDCP_CONTENT_TYPE0, false);
 }
 
-struct hdcp_workqueue *hdcp_create_workqueue(void *psp_context, struct cp_psp *cp_psp, struct dc *dc)
+struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev, struct cp_psp *cp_psp, struct dc *dc)
 {
 
        int max_caps = dc->caps.max_links;
@@ -360,7 +360,7 @@ struct hdcp_workqueue *hdcp_create_workqueue(void *psp_context, struct cp_psp *c
                INIT_DELAYED_WORK(&hdcp_work[i].watchdog_timer_dwork, event_watchdog_timer);
                INIT_DELAYED_WORK(&hdcp_work[i].property_validate_dwork, event_property_validate);
 
-               hdcp_work[i].hdcp.config.psp.handle =  psp_context;
+               hdcp_work[i].hdcp.config.psp.handle = &adev->psp;
                hdcp_work[i].hdcp.config.ddc.handle = dc_get_link_at_index(dc, i);
                hdcp_work[i].hdcp.config.ddc.funcs.write_i2c = lp_write_i2c;
                hdcp_work[i].hdcp.config.ddc.funcs.read_i2c = lp_read_i2c;
index 6abde86bce4aaeb36b994f43b26df42f6e45aa55..331b50825510dfbb332865e54fbdd1785ce58ff5 100644 (file)
@@ -30,6 +30,7 @@
 #include "hdcp.h"
 #include "dc.h"
 #include "dm_cp_psp.h"
+#include "amdgpu.h"
 
 struct mod_hdcp;
 struct mod_hdcp_link;
@@ -64,6 +65,6 @@ void hdcp_reset_display(struct hdcp_workqueue *work, unsigned int link_index);
 void hdcp_handle_cpirq(struct hdcp_workqueue *work, unsigned int link_index);
 void hdcp_destroy(struct hdcp_workqueue *work);
 
-struct hdcp_workqueue *hdcp_create_workqueue(void *psp_context, struct cp_psp *cp_psp, struct dc *dc);
+struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev, struct cp_psp *cp_psp, struct dc *dc);
 
 #endif /* AMDGPU_DM_AMDGPU_DM_HDCP_H_ */