All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/7] drm/i915: Assert that device info bitmasks have enough bits
Date: Thu, 25 May 2023 12:27:00 +0300	[thread overview]
Message-ID: <877cswkbh7.fsf@intel.com> (raw)
In-Reply-To: <3glsg3b2nmdtzb3yijhijr2gjkwb7oaih4pwl5qiry2qrjvc3s@qk2upnfz4fjd>

On Wed, 24 May 2023, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> On Thu, May 11, 2023 at 07:55:30PM +0300, Ville Syrjälä wrote:
>>From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>>Sprinkle in some BUILD_BUG_ON()s to make sure some of
>>the bitmasks used in the device info have enough bits.
>>
>>Do we have a better place for this sort of stuff?
>
> it's being moved to display/, so I'd say the intel_display_device_info.c
> is a better place. What about using a static_assert() and leave them
> near the top of the file?

I'm afraid the whole series needs a rebase too.

BR,
Jani.

>
> Lucas De Marchi
>
>>
>>Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>---
>> drivers/gpu/drm/i915/intel_device_info.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>>diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
>>index bb10e8e78a94..ce257446b712 100644
>>--- a/drivers/gpu/drm/i915/intel_device_info.c
>>+++ b/drivers/gpu/drm/i915/intel_device_info.c
>>@@ -414,6 +414,10 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
>> 	struct intel_runtime_info *runtime = RUNTIME_INFO(dev_priv);
>> 	enum pipe pipe;
>>
>>+	BUILD_BUG_ON(BITS_PER_TYPE(runtime->pipe_mask) < I915_MAX_PIPES);
>>+	BUILD_BUG_ON(BITS_PER_TYPE(runtime->cpu_transcoder_mask) < I915_MAX_TRANSCODERS);
>>+	BUILD_BUG_ON(BITS_PER_TYPE(runtime->port_mask) < I915_MAX_PORTS);
>>+
>> 	/* Wa_14011765242: adl-s A0,A1 */
>> 	if (IS_ADLS_DISPLAY_STEP(dev_priv, STEP_A0, STEP_A2))
>> 		for_each_pipe(dev_priv, pipe)
>>-- 
>>2.39.3
>>

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-05-25  9:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 16:55 [Intel-gfx] [PATCH 0/7] drm/i915: Init DDI ports based on port_mask Ville Syrjala
2023-05-11 16:55 ` [Intel-gfx] [PATCH 1/7] drm/i915: Remove bogus DDI-F from hsw/bdw output init Ville Syrjala
2023-05-24 15:33   ` Lucas De Marchi
2023-05-11 16:55 ` [Intel-gfx] [PATCH 2/7] drm/i915: Introduce device info port_mask Ville Syrjala
2023-05-11 16:55 ` [Intel-gfx] [PATCH 3/7] drm/i915: Assert that device info bitmasks have enough bits Ville Syrjala
2023-05-24 15:48   ` Lucas De Marchi
2023-05-25  9:27     ` Jani Nikula [this message]
2023-05-11 16:55 ` [Intel-gfx] [PATCH 4/7] drm/i915: Assert that the port being initialized is valid Ville Syrjala
2023-05-11 16:55 ` [Intel-gfx] [PATCH 5/7] drm/i915: Beef up SDVO/HDMI port checks Ville Syrjala
2023-05-11 16:55 ` [Intel-gfx] [PATCH 6/7] drm/i915: Init DDI outputs based on port_mask on skl+ Ville Syrjala
2023-05-11 16:55 ` [Intel-gfx] [PATCH 7/7] drm/i915: Convert HSW/BDW to use port_mask for DDI probe Ville Syrjala
2023-05-24 14:52   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2023-05-11 21:04 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Init DDI ports based on port_mask Patchwork
2023-05-11 21:04 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-05-11 21:11 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-05-24 21:05 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Init DDI ports based on port_mask (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cswkbh7.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.