Allocate a multipage object that can be used for input and output for intel_hdcp_gsc_message so that corruption of output message can be avoided by the current overwriting method. Modify intel_gsc_send_sync() to take into account header_out and addr_out so as to use them to verify the message send status. Check link for comment and review history https://patchwork.freedesktop.org/series/118499/ --v2 -Change approach from allocating two objects to just one multipage object [Daniele] --v3 -Squash the two patches together [Daniele] -No need to allocate twice the size of intel_hdcp_gsc_message [Daniele] Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Cc: Alan Previn <alan.previn.teres.alexis@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230602105113.1791104-1-suraj.kandpal@intel.com
27 lines
664 B
C
27 lines
664 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef __INTEL_HDCP_GSC_H__
|
|
#define __INTEL_HDCP_GSC_H__
|
|
|
|
#include <linux/err.h>
|
|
#include <linux/types.h>
|
|
|
|
struct drm_i915_private;
|
|
|
|
struct intel_hdcp_gsc_message {
|
|
struct i915_vma *vma;
|
|
void *hdcp_cmd_in;
|
|
void *hdcp_cmd_out;
|
|
};
|
|
|
|
bool intel_hdcp_gsc_cs_required(struct drm_i915_private *i915);
|
|
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);
|
|
|
|
#endif /* __INTEL_HDCP_GCS_H__ */
|