[RFC 1/9] mei: late_bind: add late binding component driver

Nilawar, Badal badal.nilawar at intel.com
Wed Apr 30 12:23:25 UTC 2025


On 29-04-2025 14:25, Jani Nikula wrote:
> On Tue, 29 Apr 2025, Badal Nilawar <badal.nilawar at intel.com> wrote:
>> diff --git a/include/drm/intel/xe_late_bind_mei_interface.h b/include/drm/intel/xe_late_bind_mei_interface.h
>> new file mode 100644
>> index 000000000000..4005c4c6184f
>> --- /dev/null
>> +++ b/include/drm/intel/xe_late_bind_mei_interface.h
>> @@ -0,0 +1,49 @@
>> +/* SPDX-License-Identifier: MIT */
>> +/*
>> + * Copyright (c) 2025 Intel Corporation
>> + */
>> +
>> +#ifndef _XE_LATE_BIND_MEI_INTERFACE_H_
>> +#define _XE_LATE_BIND_MEI_INTERFACE_H_
>> +
>> +#include <linux/types.h>
>> +
>> +struct device;
>> +struct module;
>> +
>> +/**
>> + * struct xe_late_bind_component_ops - ops for Late Binding services.
>> + * @owner: Module providing the ops
>> + * @push_config: Sends a config to FW.
>> + */
>> +struct xe_late_bind_component_ops {
> Please don't name the file after xe, please don't name the structs after
> xe. The whole directory include/drm/intel/ is supposed to be agnostic to
> i915 or xe, even if the current naming has i915 for historical
> reasons.
>
> Aim for generic interfaces and solutions and naming instead of doing
> something specific for xe, even if the first user is xe.

Thanks for review comment, I will address this in v3.

Regards,
Badal

> BR,
> Jani.
>
>
>> +	struct module *owner;
>> +
>> +	/**
>> +	 * @push_config: Sends a config to FW.
>> +	 * @dev: device struct corresponding to the mei device
>> +	 * @type: payload type
>> +	 * @flags: payload flags
>> +	 * @payload: payload buffer
>> +	 * @payload_size: payload buffer size
>> +	 *
>> +	 * Return: 0 success, negative errno value on transport failure,
>> +	 *         positive status returned by FW
>> +	 */
>> +	int (*push_config)(struct device *dev, u32 type, u32 flags,
>> +			   const void *payload, size_t payload_size);
>> +};
>> +
>> +/**
>> + * struct xe_late_bind_component - Late Binding services component
>> + * @mei_dev: device that provide Late Binding service.
>> + * @ops: Ops implemented by Late Binding driver, used by Xe driver.
>> + *
>> + * Communication between Xe and MEI drivers for Late Binding services
>> + */
>> +struct xe_late_bind_component {
>> +	struct device *mei_dev;
>> +	const struct xe_late_bind_component_ops *ops;
>> +};
>> +
>> +#endif /* _XE_LATE_BIND_MEI_INTERFACE_H_ */


More information about the Intel-xe mailing list