mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-22 08:53:44 -05:00
drm/i915/hdcp: Move to using intel_display in intel_hdcp
Move to using intel_display wherever possible in intel_hdcp.c as a part of code refactor. --v2 -Move intel_display to the first line wherever possible [Jani] -use the closest reference when using to_intel_display [Jani] Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240911090540.643155-2-suraj.kandpal@intel.com
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -19,18 +19,19 @@ struct intel_hdcp_gsc_message {
|
||||
void *hdcp_cmd_out;
|
||||
};
|
||||
|
||||
bool intel_hdcp_gsc_cs_required(struct drm_i915_private *i915)
|
||||
bool intel_hdcp_gsc_cs_required(struct intel_display *display)
|
||||
{
|
||||
return DISPLAY_VER(i915) >= 14;
|
||||
return DISPLAY_VER(display) >= 14;
|
||||
}
|
||||
|
||||
bool intel_hdcp_gsc_check_status(struct drm_i915_private *i915)
|
||||
bool intel_hdcp_gsc_check_status(struct intel_display *display)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(display->drm);
|
||||
struct intel_gt *gt = i915->media_gt;
|
||||
struct intel_gsc_uc *gsc = gt ? >->uc.gsc : NULL;
|
||||
|
||||
if (!gsc || !intel_uc_fw_is_running(&gsc->fw)) {
|
||||
drm_dbg_kms(&i915->drm,
|
||||
drm_dbg_kms(display->drm,
|
||||
"GSC components required for HDCP2.2 are not ready\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -10,14 +10,15 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
struct drm_i915_private;
|
||||
struct intel_display;
|
||||
struct intel_hdcp_gsc_message;
|
||||
|
||||
bool intel_hdcp_gsc_cs_required(struct drm_i915_private *i915);
|
||||
bool intel_hdcp_gsc_cs_required(struct intel_display *display);
|
||||
ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
|
||||
size_t msg_in_len, u8 *msg_out,
|
||||
size_t msg_out_len);
|
||||
int intel_hdcp_gsc_init(struct drm_i915_private *i915);
|
||||
void intel_hdcp_gsc_fini(struct drm_i915_private *i915);
|
||||
bool intel_hdcp_gsc_check_status(struct drm_i915_private *i915);
|
||||
bool intel_hdcp_gsc_check_status(struct intel_display *display);
|
||||
|
||||
#endif /* __INTEL_HDCP_GCS_H__ */
|
||||
|
||||
@@ -22,11 +22,12 @@ struct hdcp2_ske_send_eks;
|
||||
struct hdcp2_rep_send_receiverid_list;
|
||||
struct hdcp2_rep_send_ack;
|
||||
struct hdcp2_rep_stream_ready;
|
||||
struct intel_display;
|
||||
|
||||
ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
|
||||
size_t msg_in_len, u8 *msg_out,
|
||||
size_t msg_out_len);
|
||||
bool intel_hdcp_gsc_check_status(struct drm_i915_private *i915);
|
||||
bool intel_hdcp_gsc_check_status(struct intel_display *display);
|
||||
int
|
||||
intel_hdcp_gsc_initiate_session(struct device *dev, struct hdcp_port_data *data,
|
||||
struct hdcp2_ake_init *ake_data);
|
||||
|
||||
@@ -30,13 +30,14 @@ struct intel_hdcp_gsc_message {
|
||||
|
||||
#define HDCP_GSC_HEADER_SIZE sizeof(struct intel_gsc_mtl_header)
|
||||
|
||||
bool intel_hdcp_gsc_cs_required(struct xe_device *xe)
|
||||
bool intel_hdcp_gsc_cs_required(struct intel_display *display)
|
||||
{
|
||||
return DISPLAY_VER(xe) >= 14;
|
||||
return DISPLAY_VER(display) >= 14;
|
||||
}
|
||||
|
||||
bool intel_hdcp_gsc_check_status(struct xe_device *xe)
|
||||
bool intel_hdcp_gsc_check_status(struct intel_display *display)
|
||||
{
|
||||
struct xe_device *xe = to_xe_device(display->drm);
|
||||
struct xe_tile *tile = xe_device_get_root_tile(xe);
|
||||
struct xe_gt *gt = tile->media_gt;
|
||||
struct xe_gsc *gsc = >->uc.gsc;
|
||||
|
||||
Reference in New Issue
Block a user