drivers/gpu/drm/imagination/pvr_free_list.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/imagination/pvr_free_list.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/imagination/pvr_free_list.c
Extension
.c
Size
17128 bytes
Lines
625
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (!WARN_ON(IS_ERR(hwrt_fw_data))) {
			hwrt_fw_data->state = ROGUE_FWIF_RTDATA_STATE_HWR;
			hwrt_fw_data->hwrt_data_flags &= ~HWRTDATA_HAS_LAST_GEOM;
		}

		pvr_fw_object_vunmap(hwrt_data->fw_obj);
	}

	mutex_unlock(&free_list->lock);

	pvr_free_list_put(free_list);
}

void
pvr_free_list_process_reconstruct_req(struct pvr_device *pvr_dev,
				struct rogue_fwif_fwccb_cmd_freelists_reconstruction_data *req)
{
	struct rogue_fwif_kccb_cmd resp_cmd = {
		.cmd_type = ROGUE_FWIF_KCCB_CMD_FREELISTS_RECONSTRUCTION_UPDATE,
	};
	struct rogue_fwif_freelists_reconstruction_data *resp =
		&resp_cmd.cmd_data.free_lists_reconstruction_data;

	for (u32 i = 0; i < req->freelist_count; i++)
		pvr_free_list_reconstruct(pvr_dev, req->freelist_ids[i]);

	resp->freelist_count = req->freelist_count;
	memcpy(resp->freelist_ids, req->freelist_ids,
	       req->freelist_count * sizeof(resp->freelist_ids[0]));

	WARN_ON(pvr_kccb_send_cmd(pvr_dev, &resp_cmd, NULL));
}

Annotation

Implementation Notes