Lines Matching +full:0 +full:xe

33 bool intel_hdcp_gsc_cs_required(struct xe_device *xe)  in intel_hdcp_gsc_cs_required()  argument
35 return DISPLAY_VER(xe) >= 14; in intel_hdcp_gsc_cs_required()
38 bool intel_hdcp_gsc_check_status(struct xe_device *xe) in intel_hdcp_gsc_check_status() argument
40 struct xe_tile *tile = xe_device_get_root_tile(xe); in intel_hdcp_gsc_check_status()
46 drm_dbg_kms(&xe->drm, in intel_hdcp_gsc_check_status()
51 xe_pm_runtime_get(xe); in intel_hdcp_gsc_check_status()
53 drm_dbg_kms(&xe->drm, in intel_hdcp_gsc_check_status()
64 xe_pm_runtime_put(xe); in intel_hdcp_gsc_check_status()
69 static int intel_hdcp_gsc_initialize_message(struct xe_device *xe, in intel_hdcp_gsc_initialize_message() argument
74 int ret = 0; in intel_hdcp_gsc_initialize_message()
77 bo = xe_bo_create_pin_map(xe, xe_device_get_root_tile(xe), NULL, PAGE_SIZE * 2, in intel_hdcp_gsc_initialize_message()
83 drm_err(&xe->drm, "Failed to allocate bo for HDCP streaming command!\n"); in intel_hdcp_gsc_initialize_message()
90 xe_map_memset(xe, &bo->vmap, 0, 0, bo->size); in intel_hdcp_gsc_initialize_message()
99 static int intel_hdcp_gsc_hdcp2_init(struct xe_device *xe) in intel_hdcp_gsc_hdcp2_init() argument
113 ret = intel_hdcp_gsc_initialize_message(xe, hdcp_message); in intel_hdcp_gsc_hdcp2_init()
115 drm_err(&xe->drm, "Could not initialize hdcp_message\n"); in intel_hdcp_gsc_hdcp2_init()
120 xe->display.hdcp.hdcp_message = hdcp_message; in intel_hdcp_gsc_hdcp2_init()
140 int intel_hdcp_gsc_init(struct xe_device *xe) in intel_hdcp_gsc_init() argument
149 mutex_lock(&xe->display.hdcp.hdcp_mutex); in intel_hdcp_gsc_init()
150 xe->display.hdcp.arbiter = data; in intel_hdcp_gsc_init()
151 xe->display.hdcp.arbiter->hdcp_dev = xe->drm.dev; in intel_hdcp_gsc_init()
152 xe->display.hdcp.arbiter->ops = &gsc_hdcp_ops; in intel_hdcp_gsc_init()
153 ret = intel_hdcp_gsc_hdcp2_init(xe); in intel_hdcp_gsc_init()
157 mutex_unlock(&xe->display.hdcp.hdcp_mutex); in intel_hdcp_gsc_init()
162 void intel_hdcp_gsc_fini(struct xe_device *xe) in intel_hdcp_gsc_fini() argument
165 xe->display.hdcp.hdcp_message; in intel_hdcp_gsc_fini()
166 struct i915_hdcp_arbiter *arb = xe->display.hdcp.arbiter; in intel_hdcp_gsc_fini()
171 xe->display.hdcp.hdcp_message = NULL; in intel_hdcp_gsc_fini()
175 xe->display.hdcp.arbiter = NULL; in intel_hdcp_gsc_fini()
178 static int xe_gsc_send_sync(struct xe_device *xe, in xe_gsc_send_sync() argument
191 drm_err(&xe->drm, "failed to send gsc HDCP msg (%d)\n", ret); in xe_gsc_send_sync()
195 if (xe_gsc_check_and_update_pending(xe, map, 0, map, addr_out_off)) in xe_gsc_send_sync()
198 ret = xe_gsc_read_out_header(xe, map, addr_out_off, in xe_gsc_send_sync()
204 ssize_t intel_hdcp_gsc_msg_send(struct xe_device *xe, u8 *msg_in, in intel_hdcp_gsc_msg_send() argument
212 u32 addr_out_off, addr_in_wr_off = 0; in intel_hdcp_gsc_msg_send()
213 int ret, tries = 0; in intel_hdcp_gsc_msg_send()
222 hdcp_message = xe->display.hdcp.hdcp_message; in intel_hdcp_gsc_msg_send()
226 xe_pm_runtime_get_noresume(xe); in intel_hdcp_gsc_msg_send()
227 addr_in_wr_off = xe_gsc_emit_header(xe, &hdcp_message->hdcp_bo->vmap, in intel_hdcp_gsc_msg_send()
230 xe_map_memcpy_to(xe, &hdcp_message->hdcp_bo->vmap, addr_in_wr_off, in intel_hdcp_gsc_msg_send()
239 ret = xe_gsc_send_sync(xe, hdcp_message, msg_size_in, msg_size_out, in intel_hdcp_gsc_msg_send()
253 xe_map_memcpy_from(xe, msg_out, &hdcp_message->hdcp_bo->vmap, in intel_hdcp_gsc_msg_send()
258 xe_pm_runtime_put(xe); in intel_hdcp_gsc_msg_send()