*/
if (client->client_base) {
+ uint16_t db_id = client->doorbell_id;
+
/*
* If we got as far as setting up a doorbell, make sure
* we shut it down before unmapping & deallocating the
* GuC that we've finished with it, finally deallocate
* it in our bitmap
*/
- if (client->doorbell_id != GUC_INVALID_DOORBELL_ID) {
+ if (db_id != GUC_INVALID_DOORBELL_ID) {
guc_disable_doorbell(guc, client);
- host2guc_release_doorbell(guc, client);
- release_doorbell(guc, client->doorbell_id);
+ if (test_bit(db_id, guc->doorbell_bitmap))
+ host2guc_release_doorbell(guc, client);
+ release_doorbell(guc, db_id);
}
kunmap(kmap_to_page(client->client_base));
const size_t gemsize = round_up(poolsize, PAGE_SIZE);
struct intel_guc *guc = &dev_priv->guc;
+ /* Wipe bitmap & delete client in case of reinitialisation */
+ bitmap_clear(guc->doorbell_bitmap, 0, GUC_MAX_DOORBELLS);
+ i915_guc_submission_disable(dev);
+
if (!i915.enable_guc_submission)
return 0; /* not enabled */
return -ENOMEM;
ida_init(&guc->ctx_ids);
-
guc_create_log(guc);
-
guc_create_ads(guc);
return 0;
intel_guc_fw_status_repr(guc_fw->guc_fw_load_status));
if (i915.enable_guc_submission) {
- /* The execbuf_client will be recreated. Release it first. */
- i915_guc_submission_disable(dev);
-
err = i915_guc_submission_enable(dev);
if (err)
goto fail;