[PATCH v5 4/8] drm/i915/pxp: Add GSC-CS backend to send GSC fw messages
Teres Alexis, Alan Previn
alan.previn.teres.alexis at intel.com
Wed Feb 15 19:58:56 UTC 2023
On Tue, 2023-02-14 at 13:38 -0800, Teres Alexis, Alan Previn wrote:
alan:snip
> +static int gsccs_send_message(struct intel_pxp *pxp,
> + void *msg_in, size_t msg_in_size,
> + void *msg_out, size_t msg_out_size_max,
> + size_t *msg_out_len,
> + u64 *gsc_msg_handle_retry)
> +{
> + struct intel_gt *gt = pxp->ctrl_gt;
> + struct drm_i915_private *i915 = gt->i915;
> + struct gsccs_session_resources *exec = &pxp->gsccs_res;
> + struct intel_gsc_mtl_header *header = exec->pkt_vaddr;
> + struct intel_gsc_heci_non_priv_pkt pkt;
> + bool null_pkt = !msg_in && !msg_out;
> + size_t max_msg_size;
> + u32 reply_size;
> + int ret;
> +
> + if (!exec->ce)
> + return -ENODEV;
> +
> + max_msg_size = PXP43_MAX_HECI_IN_SIZE - sizeof(*header);
> +
> + if (msg_in_size > max_msg_size || msg_out_size_max > max_msg_size)
> + return -ENOSPC;
> +
> + mutex_lock(&pxp->tee_mutex);
> +
> + if (!exec->pkt_vma || !exec->bb_vma)
> + return -ENOENT;
> +
alan: nack - i need to move the tee_mutex to after this pkt_vma / bb_bma checks
More information about the dri-devel
mailing list