- Fix use zero-length element array
- Move more from system wq to ordered private wq - Do not ignore return for drmm_mutex_init -----BEGIN PGP SIGNATURE----- iQJNBAABCAA3FiEE6rM8lpABPHM5FqyDm6KlpjDL6lMFAmY9IoMZHGx1Y2FzLmRl bWFyY2hpQGludGVsLmNvbQAKCRCboqWmMMvqUyaDD/sFDt5Ew3f79bQVoBmJ1G4B IHWWDsCiqd+JAo3qP85VBF3vL9qjtTk4khfSkfNrWspcBuTjmnLH88zapODLjJhC 1CbPFVbEOwlDGZcHMIR8V2itwE/TDBpUy7OQk7mggdsXmrd1ivqsOtup0kpYLhAC LI3dsUT1isua5b1wMcXHrqjjITbIU6i0G0G1JYmj8X78mDcSVK/AEIgf59dQa2Cm kU9zemEaPZnueDATPPM3q/T3tZIDmkKEs3t7ipDvh1WDtdrTrH4uOvkAKZLCTBLE RQtgn6XNYQG5QFbkD7I3HszQXHZhs3poHtj75FudO8Vuz5YFvu7kTXcjdU36+kw0 qcLCwnWkVklqyozCLuO0dXGdwyGtwsOZAplhAHv/g2FokZjZXaMU2rJu2xKK/FOE bzOQubQWtWLOCQvt4Xmh89T0Pj0DAC7K06p+fymL89XvtzpjnsGVDAtBcbCe/9IB rivJbp+YUNFB75oq7chRIDAWZZMSNQJoA93YGtvXF/sJpdHwk/ezAxX58tLmlwuu kmy8ZV9/beKihA0iikMVAP/i24EYtoUP+03K75S/OGuO603WGfUGa9CotDJgCtE+ PZpaizYeIQk9Dn7gfCwu/ee6IWBKCHCtP3a5CnnFqXBpgF+2fMEWRxMWqpE+w2yr IqX9BHXetTFOxWLsdOvlKQ== =iAzA -----END PGP SIGNATURE----- Merge tag 'drm-xe-fixes-2024-05-09' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes - Fix use zero-length element array - Move more from system wq to ordered private wq - Do not ignore return for drmm_mutex_init Signed-off-by: Dave Airlie <airlied@redhat.com> From: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/c3rduifdp5wipkljdpuq4x6uowkc2uyzgdoft4txvp6mgvzjaj@7zw7c6uw4wrf
This commit is contained in:
commit
fa68a34ec3
|
@ -100,7 +100,7 @@ struct __guc_ads_blob {
|
|||
struct guc_engine_usage engine_usage;
|
||||
struct guc_um_init_params um_init_params;
|
||||
/* From here on, location is dynamic! Refer to above diagram. */
|
||||
struct guc_mmio_reg regset[0];
|
||||
struct guc_mmio_reg regset[];
|
||||
} __packed;
|
||||
|
||||
#define ads_blob_read(ads_, field_) \
|
||||
|
|
|
@ -120,6 +120,7 @@ static void guc_ct_fini(struct drm_device *drm, void *arg)
|
|||
{
|
||||
struct xe_guc_ct *ct = arg;
|
||||
|
||||
destroy_workqueue(ct->g2h_wq);
|
||||
xa_destroy(&ct->fence_lookup);
|
||||
}
|
||||
|
||||
|
@ -145,13 +146,20 @@ int xe_guc_ct_init(struct xe_guc_ct *ct)
|
|||
|
||||
xe_assert(xe, !(guc_ct_size() % PAGE_SIZE));
|
||||
|
||||
drmm_mutex_init(&xe->drm, &ct->lock);
|
||||
ct->g2h_wq = alloc_ordered_workqueue("xe-g2h-wq", 0);
|
||||
if (!ct->g2h_wq)
|
||||
return -ENOMEM;
|
||||
|
||||
spin_lock_init(&ct->fast_lock);
|
||||
xa_init(&ct->fence_lookup);
|
||||
INIT_WORK(&ct->g2h_worker, g2h_worker_func);
|
||||
init_waitqueue_head(&ct->wq);
|
||||
init_waitqueue_head(&ct->g2h_fence_wq);
|
||||
|
||||
err = drmm_mutex_init(&xe->drm, &ct->lock);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
primelockdep(ct);
|
||||
|
||||
bo = xe_managed_bo_create_pin_map(xe, tile, guc_ct_size(),
|
||||
|
|
|
@ -34,7 +34,7 @@ static inline void xe_guc_ct_irq_handler(struct xe_guc_ct *ct)
|
|||
return;
|
||||
|
||||
wake_up_all(&ct->wq);
|
||||
queue_work(system_unbound_wq, &ct->g2h_worker);
|
||||
queue_work(ct->g2h_wq, &ct->g2h_worker);
|
||||
xe_guc_ct_fast_path(ct);
|
||||
}
|
||||
|
||||
|
|
|
@ -120,6 +120,8 @@ struct xe_guc_ct {
|
|||
wait_queue_head_t wq;
|
||||
/** @g2h_fence_wq: wait queue used for G2H fencing */
|
||||
wait_queue_head_t g2h_fence_wq;
|
||||
/** @g2h_wq: used to process G2H */
|
||||
struct workqueue_struct *g2h_wq;
|
||||
/** @msg: Message buffer */
|
||||
u32 msg[GUC_CTB_MSG_MAX_LEN];
|
||||
/** @fast_msg: Message buffer */
|
||||
|
|
Loading…
Reference in New Issue