[Intel-gfx] [PATCH v5] drm/i915/dsb: Pre allocate and late cleanup of cmd buffer

Jani Nikula jani.nikula at intel.com
Mon May 11 08:49:49 UTC 2020


On Mon, 11 May 2020, "Manna, Animesh" <animesh.manna at intel.com> wrote:
> On 08-05-2020 16:44, Maarten Lankhorst wrote:
>> Op 06-05-2020 om 15:11 schreef Animesh Manna:
>>> -	struct intel_dsb *dsb = intel_dsb_get(crtc);
>>> +	struct intel_dsb *dsb = (struct intel_dsb *)&crtc_state->dsb;
>> Why the cast? Unconstify crtc_state as it's obviously not const any more.
>
> Dsb cmd buffer filling is done in load_lut function, so need to
> unconstify. Otherwise throwing warning during compilation.

You shouldn't just throw the const away like that using a cast. It's a
bad idea. Don't do it.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list