<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 11-05-2020 14:19, Jani Nikula wrote:<br>
</div>
<blockquote type="cite" cite="mid:87mu6e6eky.fsf@intel.com">
<pre class="moz-quote-pre" wrap="">On Mon, 11 May 2020, "Manna, Animesh" <a class="moz-txt-link-rfc2396E" href="mailto:animesh.manna@intel.com"><animesh.manna@intel.com></a> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On 08-05-2020 16:44, Maarten Lankhorst wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Op 06-05-2020 om 15:11 schreef Animesh Manna:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">- struct intel_dsb *dsb = intel_dsb_get(crtc);
+ struct intel_dsb *dsb = (struct intel_dsb *)&crtc_state->dsb;
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">Why the cast? Unconstify crtc_state as it's obviously not const any more.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Dsb cmd buffer filling is done in load_lut function, so need to
unconstify. Otherwise throwing warning during compilation.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
You shouldn't just throw the const away like that using a cast. It's a
bad idea. Don't do it.</pre>
</blockquote>
<pre>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
</pre>
<blockquote type="cite" cite="mid:87mu6e6eky.fsf@intel.com">
<pre class="moz-quote-pre" wrap="">
BR,
Jani.
</pre>
</blockquote>
</body>
</html>