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

Manna, Animesh animesh.manna at intel.com
Mon May 11 09:19:27 UTC 2020


On 11-05-2020 14:19, Jani Nikula wrote:
> 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.

Hi Jani/Maarten,

DSB instance was kept under intel_crtc to avoid typecasting. I do not know a way out to keep dsb-instance in intel_crtc_state and fill the dsb-cmd-buf using load-lut api.
Maybe avoid using current load-lut api and create a separate api to fill the cmd_buf can be a solution. Can you please suggest.

Regards,
Animesh

>
> BR,
> Jani.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20200511/9171a543/attachment-0001.htm>


More information about the Intel-gfx mailing list