Message ID | 20240621073454.1421676-1-mitulkumar.ajitkumar.golani@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/display: Consider adjusted_pixel_rate to be u64 | expand |
On Fri, Jun 21, 2024 at 01:04:54PM +0530, Mitul Golani wrote: > Consider adjusted_pixel_rate to be a u64 to match the return > type of mul_u32_u32() and avoid any compiler dependency for > do_div. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> > > Fixes: 1676ecd303ac ("drm/i915: Compute CMRR and calculate vtotal") > Cc: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> > Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> > Cc: Suraj Kandpal <suraj.kandpal@intel.com> > Cc: Jani Nikula <jani.nikula@linux.intel.com> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Cc: Nathan Chancellor <nathan@kernel.org> > Cc: intel-xe@lists.freedesktop.org > Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> > --- > drivers/gpu/drm/i915/display/intel_vrr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c > index 6430da25957d..5a0da64c7db3 100644 > --- a/drivers/gpu/drm/i915/display/intel_vrr.c > +++ b/drivers/gpu/drm/i915/display/intel_vrr.c > @@ -137,7 +137,7 @@ static unsigned int > cmrr_get_vtotal(struct intel_crtc_state *crtc_state, bool video_mode_required) > { > int multiplier_m = 1, multiplier_n = 1, vtotal, desired_refresh_rate; > - long long adjusted_pixel_rate; > + u64 adjusted_pixel_rate; > struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; > > desired_refresh_rate = drm_mode_vrefresh(adjusted_mode); > -- > 2.45.2 >
On Fri, 21 Jun 2024, Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> wrote: > Consider adjusted_pixel_rate to be a u64 to match the return > type of mul_u32_u32() and avoid any compiler dependency for > do_div. You should mention this fixes 32-bit builds. Might also want to give a link to the actual build failure, and give credit to the reporter: Closes: https://lore.kernel.org/r/20240619154207.GA1125704@thelio-3990X Reported-by: Nathan Chancellor <nathan@kernel.org> > > Fixes: 1676ecd303ac ("drm/i915: Compute CMRR and calculate vtotal") > Cc: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> > Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> > Cc: Suraj Kandpal <suraj.kandpal@intel.com> > Cc: Jani Nikula <jani.nikula@linux.intel.com> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Cc: Nathan Chancellor <nathan@kernel.org> > Cc: intel-xe@lists.freedesktop.org > Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> > --- > drivers/gpu/drm/i915/display/intel_vrr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c > index 6430da25957d..5a0da64c7db3 100644 > --- a/drivers/gpu/drm/i915/display/intel_vrr.c > +++ b/drivers/gpu/drm/i915/display/intel_vrr.c > @@ -137,7 +137,7 @@ static unsigned int > cmrr_get_vtotal(struct intel_crtc_state *crtc_state, bool video_mode_required) > { > int multiplier_m = 1, multiplier_n = 1, vtotal, desired_refresh_rate; > - long long adjusted_pixel_rate; > + u64 adjusted_pixel_rate; > struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; > > desired_refresh_rate = drm_mode_vrefresh(adjusted_mode);
> -----Original Message----- > From: Golani, Mitulkumar Ajitkumar > <mitulkumar.ajitkumar.golani@intel.com> > Sent: Friday, June 21, 2024 1:05 PM > To: intel-gfx@lists.freedesktop.org > Cc: intel-xe@lists.freedesktop.org; Vivi, Rodrigo <rodrigo.vivi@intel.com>; > jani.nikula@linux.intel.com; Kandpal, Suraj <suraj.kandpal@intel.com>; > Nautiyal, Ankit K <ankit.k.nautiyal@intel.com>; nathan@kernel.org > Subject: [PATCH] drm/i915/display: Consider adjusted_pixel_rate to be u64 > > Consider adjusted_pixel_rate to be a u64 to match the return type of > mul_u32_u32() and avoid any compiler dependency for do_div. > > Fixes: 1676ecd303ac ("drm/i915: Compute CMRR and calculate vtotal") > Cc: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> > Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> > Cc: Suraj Kandpal <suraj.kandpal@intel.com> > Cc: Jani Nikula <jani.nikula@linux.intel.com> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Cc: Nathan Chancellor <nathan@kernel.org> > Cc: intel-xe@lists.freedesktop.org > Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Thanks for the patches and reviews Pushed to drm-intel-next Regards, Suraj Kandpal > --- > drivers/gpu/drm/i915/display/intel_vrr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c > b/drivers/gpu/drm/i915/display/intel_vrr.c > index 6430da25957d..5a0da64c7db3 100644 > --- a/drivers/gpu/drm/i915/display/intel_vrr.c > +++ b/drivers/gpu/drm/i915/display/intel_vrr.c > @@ -137,7 +137,7 @@ static unsigned int > cmrr_get_vtotal(struct intel_crtc_state *crtc_state, bool > video_mode_required) { > int multiplier_m = 1, multiplier_n = 1, vtotal, desired_refresh_rate; > - long long adjusted_pixel_rate; > + u64 adjusted_pixel_rate; > struct drm_display_mode *adjusted_mode = &crtc_state- > >hw.adjusted_mode; > > desired_refresh_rate = drm_mode_vrefresh(adjusted_mode); > -- > 2.45.2
diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index 6430da25957d..5a0da64c7db3 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -137,7 +137,7 @@ static unsigned int cmrr_get_vtotal(struct intel_crtc_state *crtc_state, bool video_mode_required) { int multiplier_m = 1, multiplier_n = 1, vtotal, desired_refresh_rate; - long long adjusted_pixel_rate; + u64 adjusted_pixel_rate; struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; desired_refresh_rate = drm_mode_vrefresh(adjusted_mode);
Consider adjusted_pixel_rate to be a u64 to match the return type of mul_u32_u32() and avoid any compiler dependency for do_div. Fixes: 1676ecd303ac ("drm/i915: Compute CMRR and calculate vtotal") Cc: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Cc: Suraj Kandpal <suraj.kandpal@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Nathan Chancellor <nathan@kernel.org> Cc: intel-xe@lists.freedesktop.org Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> --- drivers/gpu/drm/i915/display/intel_vrr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)