On 23-03-22, 20:10, Vinod Koul wrote:
On 17-02-22, 23:32, Marijn Suijten wrote:
On 2022-02-10 16:04:17, Vinod Koul wrote:
- slice_count = dsc->drm->slice_count;
- slice_per_intf = DIV_ROUND_UP(width, dsc->drm->slice_width);
- /*
* If slice_count is greater than slice_per_intf then default to 1.
* This can happen during partial update.
*/
- if (slice_count > slice_per_intf)
slice_count = 1;
- bytes_in_slice = DIV_ROUND_UP(dsc->drm->slice_width *
dsc->drm->bits_per_pixel, 8);
- total_bytes_per_intf = bytes_in_slice * slice_per_intf;
- dsc->eol_byte_num = total_bytes_per_intf % 3;
- dsc->pclk_per_line = DIV_ROUND_UP(total_bytes_per_intf, 3);
- dsc->bytes_in_slice = bytes_in_slice;
- dsc->bytes_per_pkt = bytes_in_slice * slice_count;
- dsc->pkt_per_line = slice_per_intf / slice_count;
+}
I've seen the same calculations duplicated twice in dsi code. Since the msm_display_dsc_config struct is available in a header, perhaps a single
- easily reviewable and maintainable - calculation function should be
available there too?
Let me try check if we can make it common..
I rechecked and we can actually remove this as we do this caln in timing and update the dsc structure there. So this fn is dropped now