Re: [Freedreno] [PATCH] drm/msm/dp: use ARRAY_SIZE for calculating num_descs

2022-06-28 Thread Kuogee Hsieh
On 6/27/2022 2:23 PM, Dmitry Baryshkov wrote: On 28/06/2022 00:01, Kuogee Hsieh wrote: On 6/27/2022 1:05 PM, Dmitry Baryshkov wrote: On Mon, 27 Jun 2022 at 22:26, Kuogee Hsieh wrote: On 6/27/2022 9:54 AM, Dmitry Baryshkov wrote: If for some reason the msm_dp_config::descs array starts

Re: [Freedreno] [PATCH] drm/msm/dp: use ARRAY_SIZE for calculating num_descs

2022-06-27 Thread Dmitry Baryshkov
On 28/06/2022 00:01, Kuogee Hsieh wrote: On 6/27/2022 1:05 PM, Dmitry Baryshkov wrote: On Mon, 27 Jun 2022 at 22:26, Kuogee Hsieh wrote: On 6/27/2022 9:54 AM, Dmitry Baryshkov wrote: If for some reason the msm_dp_config::descs array starts from non-zero index or contains the hole, setting

Re: [Freedreno] [PATCH] drm/msm/dp: use ARRAY_SIZE for calculating num_descs

2022-06-27 Thread Kuogee Hsieh
On 6/27/2022 1:05 PM, Dmitry Baryshkov wrote: On Mon, 27 Jun 2022 at 22:26, Kuogee Hsieh wrote: On 6/27/2022 9:54 AM, Dmitry Baryshkov wrote: If for some reason the msm_dp_config::descs array starts from non-zero index or contains the hole, setting the msm_dp_config::num_descs might be not

Re: [Freedreno] [PATCH] drm/msm/dp: use ARRAY_SIZE for calculating num_descs

2022-06-27 Thread Dmitry Baryshkov
On Mon, 27 Jun 2022 at 22:26, Kuogee Hsieh wrote: > > > On 6/27/2022 9:54 AM, Dmitry Baryshkov wrote: > > If for some reason the msm_dp_config::descs array starts from non-zero > > index or contains the hole, setting the msm_dp_config::num_descs might > > be not that obvious and error-prone. Use

Re: [Freedreno] [PATCH] drm/msm/dp: use ARRAY_SIZE for calculating num_descs

2022-06-27 Thread Kuogee Hsieh
On 6/27/2022 9:54 AM, Dmitry Baryshkov wrote: If for some reason the msm_dp_config::descs array starts from non-zero index or contains the hole, setting the msm_dp_config::num_descs might be not that obvious and error-prone. Use ARRAY_SIZE to set this field rather than encoding the value

Re: [Freedreno] [PATCH] drm/msm/dp: use ARRAY_SIZE for calculating num_descs

2022-06-27 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-06-27 09:54:13) > If for some reason the msm_dp_config::descs array starts from non-zero > index or contains the hole, setting the msm_dp_config::num_descs might > be not that obvious and error-prone. Use ARRAY_SIZE to set this field > rather than encoding the value

[Freedreno] [PATCH] drm/msm/dp: use ARRAY_SIZE for calculating num_descs

2022-06-27 Thread Dmitry Baryshkov
If for some reason the msm_dp_config::descs array starts from non-zero index or contains the hole, setting the msm_dp_config::num_descs might be not that obvious and error-prone. Use ARRAY_SIZE to set this field rather than encoding the value manually. Reported-by: Kuogee Hsieh Signed-off-by: