Re: [Intel-gfx] [PATCH] drm/i915/display: Return correct err code for bpc < 0

2023-04-18 Thread Nautiyal, Ankit K
On 4/19/2023 10:29 AM, Nautiyal, Ankit K wrote: On 4/19/2023 4:12 AM, Manasi Navare wrote: Hi Ville and Ankit, I actually do not think this is a problem with the DSC logic, but it is a problem with the intel_dp_link_compute_config() where we should do something if max_bpp is 0 instead of

Re: [Intel-gfx] [PATCH] drm/i915/display: Return correct err code for bpc < 0

2023-04-18 Thread Nautiyal, Ankit K
On 4/19/2023 4:12 AM, Manasi Navare wrote: Hi Ville and Ankit, I actually do not think this is a problem with the DSC logic, but it is a problem with the intel_dp_link_compute_config() where we should do something if max_bpp is 0 instead of just returning a -EINVAL directly. My question here:

Re: [Intel-gfx] [PATCH] drm/i915/display: Return correct err code for bpc < 0

2023-04-18 Thread Manasi Navare
Hi Ville and Ankit, I actually do not think this is a problem with the DSC logic, but it is a problem with the intel_dp_link_compute_config() where we should do something if max_bpp is 0 instead of just returning a -EINVAL directly. My question here: - In case of PCON, yuv format, is it a valid

Re: [Intel-gfx] [PATCH] drm/i915/display: Return correct err code for bpc < 0

2023-04-18 Thread Ville Syrjälä
On Tue, Apr 18, 2023 at 08:09:16PM +0530, Nautiyal, Ankit K wrote: > > On 4/18/2023 6:16 PM, Ville Syrjälä wrote: > > On Mon, Apr 17, 2023 at 03:48:12PM -0700, Manasi Navare wrote: > >> Hi Ville, > >> > >> Could you suggest how to handle the intel_dp_link_compute_config() > >> when the max_bpp is

Re: [Intel-gfx] [PATCH] drm/i915/display: Return correct err code for bpc < 0

2023-04-18 Thread Nautiyal, Ankit K
On 4/18/2023 6:16 PM, Ville Syrjälä wrote: On Mon, Apr 17, 2023 at 03:48:12PM -0700, Manasi Navare wrote: Hi Ville, Could you suggest how to handle the intel_dp_link_compute_config() when the max_bpp is returned as 0, currently it just exits the loop and returns a -EINVAL and this triggers

Re: [Intel-gfx] [PATCH] drm/i915/display: Return correct err code for bpc < 0

2023-04-18 Thread Ville Syrjälä
On Mon, Apr 17, 2023 at 03:48:12PM -0700, Manasi Navare wrote: > Hi Ville, > > Could you suggest how to handle the intel_dp_link_compute_config() > when the max_bpp is returned as 0, currently > it just exits the loop and returns a -EINVAL and this triggers the DSC path. > While we should be

Re: [Intel-gfx] [PATCH] drm/i915/display: Return correct err code for bpc < 0

2023-04-17 Thread Manasi Navare
Hi Ville, Could you suggest how to handle the intel_dp_link_compute_config() when the max_bpp is returned as 0, currently it just exits the loop and returns a -EINVAL and this triggers the DSC path. While we should be completely failing the modeset and encoder_config in this case instead of

Re: [Intel-gfx] [PATCH] drm/i915/display: Return correct err code for bpc < 0

2023-04-13 Thread Manasi Navare
On Tue, Apr 11, 2023 at 10:22 PM Ville Syrjälä wrote: > > On Tue, Apr 11, 2023 at 05:07:01PM -0700, Manasi Navare wrote: > > On Tue, Apr 11, 2023 at 10:42 AM Ville Syrjälä > > wrote: > > > > > > On Tue, Apr 11, 2023 at 05:34:08PM +, Manasi Navare wrote: > > > > In the function

Re: [Intel-gfx] [PATCH] drm/i915/display: Return correct err code for bpc < 0

2023-04-11 Thread Ville Syrjälä
On Tue, Apr 11, 2023 at 05:07:01PM -0700, Manasi Navare wrote: > On Tue, Apr 11, 2023 at 10:42 AM Ville Syrjälä > wrote: > > > > On Tue, Apr 11, 2023 at 05:34:08PM +, Manasi Navare wrote: > > > In the function intel_dp_max_bpp(), currently if bpc < 0 in case of error, > > > we return 0

Re: [Intel-gfx] [PATCH] drm/i915/display: Return correct err code for bpc < 0

2023-04-11 Thread Manasi Navare
On Tue, Apr 11, 2023 at 10:42 AM Ville Syrjälä wrote: > > On Tue, Apr 11, 2023 at 05:34:08PM +, Manasi Navare wrote: > > In the function intel_dp_max_bpp(), currently if bpc < 0 in case of error, > > we return 0 instead of returning an err code of -EINVAL. > > This throws off the logic in the

Re: [Intel-gfx] [PATCH] drm/i915/display: Return correct err code for bpc < 0

2023-04-11 Thread Ville Syrjälä
On Tue, Apr 11, 2023 at 05:34:08PM +, Manasi Navare wrote: > In the function intel_dp_max_bpp(), currently if bpc < 0 in case of error, > we return 0 instead of returning an err code of -EINVAL. > This throws off the logic in the calling function. What logic? The caller doesn't expect to get