Re: [PATCH] drm/amd/display: use a more accurate check in dm_helpers_dp_read_dpcd()

2023-03-20 Thread Harry Wentland
On 3/10/23 12:51, Ville Syrjälä wrote: > On Fri, Mar 10, 2023 at 07:48:04PM +0200, Ville Syrjälä wrote: >> On Thu, Mar 09, 2023 at 04:30:27PM -0500, Hamza Mahfooz wrote: >>> We should be checking if drm_dp_dpcd_read() returns the size that we are >>> asking it to read instead of just checking

Re: [PATCH] drm/amd/display: use a more accurate check in dm_helpers_dp_read_dpcd()

2023-03-10 Thread Ville Syrjälä
On Fri, Mar 10, 2023 at 07:48:04PM +0200, Ville Syrjälä wrote: > On Thu, Mar 09, 2023 at 04:30:27PM -0500, Hamza Mahfooz wrote: > > We should be checking if drm_dp_dpcd_read() returns the size that we are > > asking it to read instead of just checking if it is greater than zero. > > Also, we

Re: [PATCH] drm/amd/display: use a more accurate check in dm_helpers_dp_read_dpcd()

2023-03-10 Thread Ville Syrjälä
On Thu, Mar 09, 2023 at 04:30:27PM -0500, Hamza Mahfooz wrote: > We should be checking if drm_dp_dpcd_read() returns the size that we are > asking it to read instead of just checking if it is greater than zero. > Also, we should WARN_ON() here since this condition is only ever met, if > there is

Re: [PATCH] drm/amd/display: use a more accurate check in dm_helpers_dp_read_dpcd()

2023-03-10 Thread Rodrigo Siqueira Jordao
On 3/9/23 14:30, Hamza Mahfooz wrote: We should be checking if drm_dp_dpcd_read() returns the size that we are asking it to read instead of just checking if it is greater than zero. Also, we should WARN_ON() here since this condition is only ever met, if there is an issue worth investigating.

[PATCH] drm/amd/display: use a more accurate check in dm_helpers_dp_read_dpcd()

2023-03-09 Thread Hamza Mahfooz
We should be checking if drm_dp_dpcd_read() returns the size that we are asking it to read instead of just checking if it is greater than zero. Also, we should WARN_ON() here since this condition is only ever met, if there is an issue worth investigating. So, compare the return value of