Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Compile error on "error: call to ‘__compiletime_assert_581’ declared with attribute error: clamp() low limit dsc_min_bpc * 3 greater than high limit dsc_max_bpc * 3"
@ 2025-02-06  8:04 Zhuo, Qiuxu
  2025-02-06 16:13 ` Nautiyal, Ankit K
  0 siblings, 1 reply; 4+ messages in thread
From: Zhuo, Qiuxu @ 2025-02-06  8:04 UTC (permalink / raw)
  To: jani.nikula@linux.intel.com, Vivi, Rodrigo,
	joonas.lahtinen@linux.intel.com, tursulin@ursulin.net,
	airlied@gmail.com, simona@ffwll.ch, Nautiyal, Ankit K
  Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Zhuo, Qiuxu

Hi,

I got the compile error as below.
My GCC is: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
kernel: v6.14-rc1

--- compile error log ---

  CC      drivers/gpu/drm/i915/display/intel_dp.o
In file included from <command-line>:0:0:
In function ‘intel_dp_dsc_compute_pipe_bpp_limits.isra.77’,
    inlined from ‘intel_dp_compute_config_limits’ at drivers/gpu/drm/i915/display/intel_dp.c:2547:3:
././include/linux/compiler_types.h:542:38: error: call to ‘__compiletime_assert_581’ declared with attribute error: clamp() low limit dsc_min_bpc * 3 greater than high limit dsc_max_bpc * 3
  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
                                      ^
././include/linux/compiler_types.h:523:4: note: in definition of macro ‘__compiletime_assert’
    prefix ## suffix();    \
    ^~~~~~
././include/linux/compiler_types.h:542:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
./include/linux/minmax.h:188:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
  BUILD_BUG_ON_MSG(statically_true(ulo > uhi),    \
  ^~~~~~~~~~~~~~~~
./include/linux/minmax.h:195:2: note: in expansion of macro ‘__clamp_once’
  __clamp_once(type, val, lo, hi, __UNIQUE_ID(v_), __UNIQUE_ID(l_), __UNIQUE_ID(h_))
  ^~~~~~~~~~~~
./include/linux/minmax.h:206:28: note: in expansion of macro ‘__careful_clamp’
 #define clamp(val, lo, hi) __careful_clamp(__auto_type, val, lo, hi)
                            ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/display/intel_dp.c:2506:25: note: in expansion of macro ‘clamp’
  limits->pipe.max_bpp = clamp(limits->pipe.max_bpp, dsc_min_bpc * 3, dsc_max_bpc * 3);
                         ^~~~~
drivers/gpu/drm/xe/Makefile:165: recipe for target 'drivers/gpu/drm/xe/i915-display/intel_dp.o' failed


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compile error on "error: call to ‘__compiletime_assert_581’ declared with attribute error: clamp() low limit dsc_min_bpc * 3 greater than high limit dsc_max_bpc * 3"
  2025-02-06  8:04 Compile error on "error: call to ‘__compiletime_assert_581’ declared with attribute error: clamp() low limit dsc_min_bpc * 3 greater than high limit dsc_max_bpc * 3" Zhuo, Qiuxu
@ 2025-02-06 16:13 ` Nautiyal, Ankit K
  2025-02-06 20:31   ` Rodrigo Vivi
  0 siblings, 1 reply; 4+ messages in thread
From: Nautiyal, Ankit K @ 2025-02-06 16:13 UTC (permalink / raw)
  To: Zhuo, Qiuxu, jani.nikula@linux.intel.com, Vivi, Rodrigo,
	joonas.lahtinen@linux.intel.com, tursulin@ursulin.net,
	airlied@gmail.com, simona@ffwll.ch
  Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org


On 2/6/2025 1:34 PM, Zhuo, Qiuxu wrote:
> Hi,
>
> I got the compile error as below.
> My GCC is: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
> kernel: v6.14-rc1

Hi Qiuxu,

Thanks for the mail.

Fix was sent and merged in drm-intel-next : 
https://cgit.freedesktop.org/drm/drm-intel/commit/?h=drm-intel-next&id=a67221b5eb8d59fb7e1f0df3ef9945b6a0f32cca

Regards,

Ankit


>
> --- compile error log ---
>
>    CC      drivers/gpu/drm/i915/display/intel_dp.o
> In file included from <command-line>:0:0:
> In function ‘intel_dp_dsc_compute_pipe_bpp_limits.isra.77’,
>      inlined from ‘intel_dp_compute_config_limits’ at drivers/gpu/drm/i915/display/intel_dp.c:2547:3:
> ././include/linux/compiler_types.h:542:38: error: call to ‘__compiletime_assert_581’ declared with attribute error: clamp() low limit dsc_min_bpc * 3 greater than high limit dsc_max_bpc * 3
>    _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>                                        ^
> ././include/linux/compiler_types.h:523:4: note: in definition of macro ‘__compiletime_assert’
>      prefix ## suffix();    \
>      ^~~~~~
> ././include/linux/compiler_types.h:542:2: note: in expansion of macro ‘_compiletime_assert’
>    _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>    ^~~~~~~~~~~~~~~~~~~
> ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
>   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>                                       ^~~~~~~~~~~~~~~~~~
> ./include/linux/minmax.h:188:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
>    BUILD_BUG_ON_MSG(statically_true(ulo > uhi),    \
>    ^~~~~~~~~~~~~~~~
> ./include/linux/minmax.h:195:2: note: in expansion of macro ‘__clamp_once’
>    __clamp_once(type, val, lo, hi, __UNIQUE_ID(v_), __UNIQUE_ID(l_), __UNIQUE_ID(h_))
>    ^~~~~~~~~~~~
> ./include/linux/minmax.h:206:28: note: in expansion of macro ‘__careful_clamp’
>   #define clamp(val, lo, hi) __careful_clamp(__auto_type, val, lo, hi)
>                              ^~~~~~~~~~~~~~~
> drivers/gpu/drm/i915/display/intel_dp.c:2506:25: note: in expansion of macro ‘clamp’
>    limits->pipe.max_bpp = clamp(limits->pipe.max_bpp, dsc_min_bpc * 3, dsc_max_bpc * 3);
>                           ^~~~~
> drivers/gpu/drm/xe/Makefile:165: recipe for target 'drivers/gpu/drm/xe/i915-display/intel_dp.o' failed
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compile error on "error: call to ‘__compiletime_assert_581’ declared with attribute error: clamp() low limit dsc_min_bpc * 3 greater than high limit dsc_max_bpc * 3"
  2025-02-06 16:13 ` Nautiyal, Ankit K
@ 2025-02-06 20:31   ` Rodrigo Vivi
  2025-02-07  2:51     ` Zhuo, Qiuxu
  0 siblings, 1 reply; 4+ messages in thread
From: Rodrigo Vivi @ 2025-02-06 20:31 UTC (permalink / raw)
  To: Nautiyal, Ankit K
  Cc: Zhuo, Qiuxu, jani.nikula@linux.intel.com,
	joonas.lahtinen@linux.intel.com, tursulin@ursulin.net,
	airlied@gmail.com, simona@ffwll.ch,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org

On Thu, Feb 06, 2025 at 09:43:54PM +0530, Nautiyal, Ankit K wrote:
> 
> On 2/6/2025 1:34 PM, Zhuo, Qiuxu wrote:
> > Hi,
> > 
> > I got the compile error as below.
> > My GCC is: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
> > kernel: v6.14-rc1
> 
> Hi Qiuxu,
> 
> Thanks for the mail.
> 
> Fix was sent and merged in drm-intel-next : https://cgit.freedesktop.org/drm/drm-intel/commit/?h=drm-intel-next&id=a67221b5eb8d59fb7e1f0df3ef9945b6a0f32cca

Which is queued to be in 6.14-rc2

> 
> Regards,
> 
> Ankit
> 
> 
> > 
> > --- compile error log ---
> > 
> >    CC      drivers/gpu/drm/i915/display/intel_dp.o
> > In file included from <command-line>:0:0:
> > In function ‘intel_dp_dsc_compute_pipe_bpp_limits.isra.77’,
> >      inlined from ‘intel_dp_compute_config_limits’ at drivers/gpu/drm/i915/display/intel_dp.c:2547:3:
> > ././include/linux/compiler_types.h:542:38: error: call to ‘__compiletime_assert_581’ declared with attribute error: clamp() low limit dsc_min_bpc * 3 greater than high limit dsc_max_bpc * 3
> >    _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> >                                        ^
> > ././include/linux/compiler_types.h:523:4: note: in definition of macro ‘__compiletime_assert’
> >      prefix ## suffix();    \
> >      ^~~~~~
> > ././include/linux/compiler_types.h:542:2: note: in expansion of macro ‘_compiletime_assert’
> >    _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> >    ^~~~~~~~~~~~~~~~~~~
> > ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
> >   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> >                                       ^~~~~~~~~~~~~~~~~~
> > ./include/linux/minmax.h:188:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
> >    BUILD_BUG_ON_MSG(statically_true(ulo > uhi),    \
> >    ^~~~~~~~~~~~~~~~
> > ./include/linux/minmax.h:195:2: note: in expansion of macro ‘__clamp_once’
> >    __clamp_once(type, val, lo, hi, __UNIQUE_ID(v_), __UNIQUE_ID(l_), __UNIQUE_ID(h_))
> >    ^~~~~~~~~~~~
> > ./include/linux/minmax.h:206:28: note: in expansion of macro ‘__careful_clamp’
> >   #define clamp(val, lo, hi) __careful_clamp(__auto_type, val, lo, hi)
> >                              ^~~~~~~~~~~~~~~
> > drivers/gpu/drm/i915/display/intel_dp.c:2506:25: note: in expansion of macro ‘clamp’
> >    limits->pipe.max_bpp = clamp(limits->pipe.max_bpp, dsc_min_bpc * 3, dsc_max_bpc * 3);
> >                           ^~~~~
> > drivers/gpu/drm/xe/Makefile:165: recipe for target 'drivers/gpu/drm/xe/i915-display/intel_dp.o' failed
> > 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Compile error on "error: call to ‘__compiletime_assert_581’ declared with attribute error: clamp() low limit dsc_min_bpc * 3 greater than high limit dsc_max_bpc * 3"
  2025-02-06 20:31   ` Rodrigo Vivi
@ 2025-02-07  2:51     ` Zhuo, Qiuxu
  0 siblings, 0 replies; 4+ messages in thread
From: Zhuo, Qiuxu @ 2025-02-07  2:51 UTC (permalink / raw)
  To: Vivi, Rodrigo, Nautiyal, Ankit K
  Cc: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
	tursulin@ursulin.net, airlied@gmail.com, simona@ffwll.ch,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org

> From: Vivi, Rodrigo <rodrigo.vivi@intel.com>
> [...]
> > On 2/6/2025 1:34 PM, Zhuo, Qiuxu wrote:
> > > Hi,
> > >
> > > I got the compile error as below.
> > > My GCC is: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
> > > kernel: v6.14-rc1
> >
> > Hi Qiuxu,
> >
> > Thanks for the mail.
> >
> > Fix was sent and merged in drm-intel-next :
> https://cgit.freedesktop.org/drm/drm-intel/commit/?h=drm-intel-
> next&id=a67221b5eb8d59fb7e1f0df3ef9945b6a0f32cca
> 
> Which is queued to be in 6.14-rc2
> 

It's good to know that this has been fixed. 
Thanks!

-Qiuxu

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-07  2:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06  8:04 Compile error on "error: call to ‘__compiletime_assert_581’ declared with attribute error: clamp() low limit dsc_min_bpc * 3 greater than high limit dsc_max_bpc * 3" Zhuo, Qiuxu
2025-02-06 16:13 ` Nautiyal, Ankit K
2025-02-06 20:31   ` Rodrigo Vivi
2025-02-07  2:51     ` Zhuo, Qiuxu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox