diff mbox series

[1/3] drm/i915/fbc: replace GEM_BUG_ON() to drm_WARN_ON()

Message ID a7d53a403822b43c7d78689a10480b47ccc0534d.1694684044.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/display: remove last uses of GEM_BUG_ON/GEM_WARN_ON | expand

Commit Message

Jani Nikula Sept. 14, 2023, 9:34 a.m. UTC
Avoid using GEM_BUG_ON() in display code.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

Comments

Rodrigo Vivi Sept. 14, 2023, 12:40 p.m. UTC | #1
On Thu, Sep 14, 2023 at 12:34:57PM +0300, Jani Nikula wrote:
> Avoid using GEM_BUG_ON() in display code.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index 817e5784660b..1cb9eec29640 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -333,12 +333,14 @@ static void i8xx_fbc_program_cfb(struct intel_fbc *fbc)
>  {
>  	struct drm_i915_private *i915 = fbc->i915;
>  
> -	GEM_BUG_ON(range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
> -					 i915_gem_stolen_node_offset(&fbc->compressed_fb),
> -					 U32_MAX));
> -	GEM_BUG_ON(range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
> -					 i915_gem_stolen_node_offset(&fbc->compressed_llb),
> -					 U32_MAX));
> +	drm_WARN_ON(&i915->drm,
> +		    range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
> +					  i915_gem_stolen_node_offset(&fbc->compressed_fb),
> +					  U32_MAX));
> +	drm_WARN_ON(&i915->drm,
> +		    range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
> +					  i915_gem_stolen_node_offset(&fbc->compressed_llb),
> +					  U32_MAX));
>  	intel_de_write(i915, FBC_CFB_BASE,
>  		       i915_gem_stolen_node_address(i915, &fbc->compressed_fb));
>  	intel_de_write(i915, FBC_LL_BASE,
> -- 
> 2.39.2
>
Jani Nikula Sept. 15, 2023, 3:28 p.m. UTC | #2
On Thu, 14 Sep 2023, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> On Thu, Sep 14, 2023 at 12:34:57PM +0300, Jani Nikula wrote:
>> Avoid using GEM_BUG_ON() in display code.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Thanks, pushed the series.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/display/intel_fbc.c | 14 ++++++++------
>>  1 file changed, 8 insertions(+), 6 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
>> index 817e5784660b..1cb9eec29640 100644
>> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
>> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
>> @@ -333,12 +333,14 @@ static void i8xx_fbc_program_cfb(struct intel_fbc *fbc)
>>  {
>>  	struct drm_i915_private *i915 = fbc->i915;
>>  
>> -	GEM_BUG_ON(range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
>> -					 i915_gem_stolen_node_offset(&fbc->compressed_fb),
>> -					 U32_MAX));
>> -	GEM_BUG_ON(range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
>> -					 i915_gem_stolen_node_offset(&fbc->compressed_llb),
>> -					 U32_MAX));
>> +	drm_WARN_ON(&i915->drm,
>> +		    range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
>> +					  i915_gem_stolen_node_offset(&fbc->compressed_fb),
>> +					  U32_MAX));
>> +	drm_WARN_ON(&i915->drm,
>> +		    range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
>> +					  i915_gem_stolen_node_offset(&fbc->compressed_llb),
>> +					  U32_MAX));
>>  	intel_de_write(i915, FBC_CFB_BASE,
>>  		       i915_gem_stolen_node_address(i915, &fbc->compressed_fb));
>>  	intel_de_write(i915, FBC_LL_BASE,
>> -- 
>> 2.39.2
>>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 817e5784660b..1cb9eec29640 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -333,12 +333,14 @@  static void i8xx_fbc_program_cfb(struct intel_fbc *fbc)
 {
 	struct drm_i915_private *i915 = fbc->i915;
 
-	GEM_BUG_ON(range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
-					 i915_gem_stolen_node_offset(&fbc->compressed_fb),
-					 U32_MAX));
-	GEM_BUG_ON(range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
-					 i915_gem_stolen_node_offset(&fbc->compressed_llb),
-					 U32_MAX));
+	drm_WARN_ON(&i915->drm,
+		    range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
+					  i915_gem_stolen_node_offset(&fbc->compressed_fb),
+					  U32_MAX));
+	drm_WARN_ON(&i915->drm,
+		    range_overflows_end_t(u64, i915_gem_stolen_area_address(i915),
+					  i915_gem_stolen_node_offset(&fbc->compressed_llb),
+					  U32_MAX));
 	intel_de_write(i915, FBC_CFB_BASE,
 		       i915_gem_stolen_node_address(i915, &fbc->compressed_fb));
 	intel_de_write(i915, FBC_LL_BASE,