From: Jani Nikula <jani.nikula@intel.com>
To: Luca Coelho <luca@coelho.fi>,
"Hogander, Jouni" <jouni.hogander@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v2 21/24] drm/i915/display: Move verbose_state_checks under display
Date: Tue, 24 Oct 2023 15:12:32 +0300 [thread overview]
Message-ID: <87msw89q33.fsf@intel.com> (raw)
In-Reply-To: <c6e2a0afa151f361ac920994cd105a9ce0b6bf9d.camel@coelho.fi>
On Tue, 24 Oct 2023, Luca Coelho <luca@coelho.fi> wrote:
> On Tue, 2023-10-24 at 08:22 +0000, Hogander, Jouni wrote:
>> On Mon, 2023-10-23 at 17:00 +0300, Luca Coelho wrote:
>> > On Mon, 2023-10-16 at 14:16 +0300, Jouni Högander wrote:
>> > > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
>> > > ---
>> > > drivers/gpu/drm/i915/display/intel_display.h | 2 +-
>> > > drivers/gpu/drm/i915/display/intel_display_params.c | 3 +++
>> > > drivers/gpu/drm/i915/display/intel_display_params.h | 1 +
>> > > drivers/gpu/drm/i915/i915_params.c | 3 ---
>> > > drivers/gpu/drm/i915/i915_params.h | 1 -
>> > > 5 files changed, 5 insertions(+), 5 deletions(-)
>> > >
>> > > diff --git a/drivers/gpu/drm/i915/display/intel_display.h
>> > > b/drivers/gpu/drm/i915/display/intel_display.h
>> > > index ba3548f9768d..bc95fb377386 100644
>> > > --- a/drivers/gpu/drm/i915/display/intel_display.h
>> > > +++ b/drivers/gpu/drm/i915/display/intel_display.h
>> > > @@ -552,7 +552,7 @@ bool assert_port_valid(struct drm_i915_private
>> > > *i915, enum port port);
>> > > struct drm_device *drm = &(__i915)-
>> > > > drm; \
>> > > int __ret_warn_on =
>> > > !!(condition); \
>> > > if
>> > > (unlikely(__ret_warn_on)) \
>> > > - if (!drm_WARN(drm, __i915-
>> > > > params.verbose_state_checks, format)) \
>> > > + if (!drm_WARN(drm, __i915-
>> > > > display.params.verbose_state_checks, format)) \
>> > > drm_err(drm,
>> > > format); \
>> > > unlikely(__ret_warn_on);
>> > > \
>> > > })
>> > > diff --git a/drivers/gpu/drm/i915/display/intel_display_params.c
>> > > b/drivers/gpu/drm/i915/display/intel_display_params.c
>> > > index 06e68c7fec1c..e86766639396 100644
>> > > --- a/drivers/gpu/drm/i915/display/intel_display_params.c
>> > > +++ b/drivers/gpu/drm/i915/display/intel_display_params.c
>> > > @@ -87,6 +87,9 @@
>> > > intel_display_param_named_unsafe(force_reset_modeset_test, bool,
>> > > 0400,
>> > > intel_display_param_named(disable_display, bool, 0400,
>> > > "Disable display (default: false)");
>> > >
>> > > +intel_display_param_named(verbose_state_checks, bool, 0400,
>> > > + "Enable verbose logs (ie. WARN_ON()) in case of unexpected
>> > > hw state conditions.");
>> > > +
>> > > intel_display_param_named_unsafe(enable_fbc, int, 0400,
>> > > "Enable frame buffer compression for power savings "
>> > > "(default: -1 (use per-chip default))");
>> > > diff --git a/drivers/gpu/drm/i915/display/intel_display_params.h
>> > > b/drivers/gpu/drm/i915/display/intel_display_params.h
>> > > index 60d9c3d59fe4..b35443f51375 100644
>> > > --- a/drivers/gpu/drm/i915/display/intel_display_params.h
>> > > +++ b/drivers/gpu/drm/i915/display/intel_display_params.h
>> > > @@ -39,6 +39,7 @@ struct drm_i915_private;
>> > > param(bool, load_detect_test, false, 0600) \
>> > > param(bool, force_reset_modeset_test, false, 0600) \
>> > > param(bool, disable_display, false, 0400) \
>> > > + param(bool, verbose_state_checks, true, 0) \
>> >
>> > Why is this one 0? Why can't we even read it?
>>
>> I found this comment in older commit message written by Jani Nikula:
>>
>> "0 mode will bypass debugfs creation. Use it for verbose_state_checks
>> which will need special attention in follow-up work."
>
> This sounds pretty odd, why wouldn't we want it to be even read?
I *think* I remember why.
When I added the device parameters, I915_STATE_WARN(), the only user of
verbose_state_checks, did not have the i915 parameter yet. So it could
not access the device parameter.
Thus the verbose_state_checks *module* parameter had to have 0600 mode,
and modifying that runtime meant that the *device* parameter, even as
read-only, would have gone out of sync and shown a different value.
I only added the i915 parameter to I915_STATE_WARN() last May, but
clearly did not follow through with the parameter change.
From now on, it should use the device param like the rest of the code,
it should have a mutable debugfs file, and the module parameter should
be 0400.
BR,
Jani.
>
> In any case, it's not related to this patch, so:
>
> Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
>
> --
> Cheers,
> Luca.
--
Jani Nikula, Intel
next prev parent reply other threads:[~2023-10-24 12:12 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 11:16 [Intel-gfx] [PATCH v2 00/24] Framework for display parameters Jouni Högander
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 01/24] drm/i915/display: Add framework to add parameters specific to display Jouni Högander
2023-10-22 17:45 ` Luca Coelho
2023-10-23 7:50 ` Hogander, Jouni
2023-10-23 8:14 ` Luca Coelho
2023-10-23 8:16 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 02/24] drm/i915/display: Dump also display parameters Jouni Högander
2023-10-23 9:10 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 03/24] drm/i915/display: Move enable_fbc module parameter under display Jouni Högander
2023-10-23 10:53 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 04/24] drm/i915/display: Move psr related module parameters " Jouni Högander
2023-10-23 11:02 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 05/24] drm/i915/display: Move vbt_firmware module parameter " Jouni Högander
2023-10-23 12:14 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 06/24] drm/i915/display: Move lvds_channel_mode " Jouni Högander
2023-10-23 13:13 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 07/24] drm/i915/display: Move panel_use_ssc " Jouni Högander
2023-10-23 13:15 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 08/24] drm/i915/display: Move vbt_sdvo_panel_type " Jouni Högander
2023-10-23 13:17 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 09/24] drm/i915/display: Move enable_dc " Jouni Högander
2023-10-23 13:18 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 10/24] drm/i915/display: Move enable_dpt " Jouni Högander
2023-10-23 13:19 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 11/24] drm/i915/display: Move enable_sagv " Jouni Högander
2023-10-23 13:22 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 12/24] drm/i915/display: Move disable_power_well " Jouni Högander
2023-10-23 13:23 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 13/24] drm/i915/display: Move enable_ips " Jouni Högander
2023-10-23 13:25 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 14/24] drm/i915/display: Move invert_brightness " Jouni Högander
2023-10-23 13:30 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 15/24] drm/i915/display: Move edp_vswing " Jouni Högander
2023-10-23 13:46 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 16/24] drm/i915/display: Move enable_dpcd_backlightmodule " Jouni Högander
2023-10-23 13:47 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 17/24] drm/i915/display: Move load_detect_test " Jouni Högander
2023-10-23 13:49 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 18/24] drm/i915/display: Move force_reset_modeset_test " Jouni Högander
2023-10-23 13:50 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 19/24] drm/i915/display: Move disable_display " Jouni Högander
2023-10-23 13:51 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 20/24] drm/i915/display: Use device parameters instead of module in I915_STATE_WARN Jouni Högander
2023-10-23 13:57 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 21/24] drm/i915/display: Move verbose_state_checks under display Jouni Högander
2023-10-23 14:00 ` Luca Coelho
2023-10-24 8:22 ` Hogander, Jouni
2023-10-24 11:31 ` Luca Coelho
2023-10-24 12:12 ` Jani Nikula [this message]
2023-10-24 12:19 ` Hogander, Jouni
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 22/24] drm/i915/display: Move nuclear_pageflip " Jouni Högander
2023-10-23 14:01 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 23/24] drm/i915/display: Move enable_dp_mst " Jouni Högander
2023-10-23 14:01 ` Luca Coelho
2023-10-16 11:16 ` [Intel-gfx] [PATCH v2 24/24] drm/i915/display: Use same permissions for enable_sagv as for rest Jouni Högander
2023-10-23 14:06 ` Luca Coelho
2023-10-24 8:51 ` Hogander, Jouni
2023-10-24 11:33 ` Luca Coelho
2023-10-24 12:15 ` Jani Nikula
2023-10-24 12:50 ` Luca Coelho
2023-10-16 11:42 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Framework for display parameters (rev3) Patchwork
2023-10-16 11:42 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-10-16 11:54 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-10-16 14:24 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=87msw89q33.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jouni.hogander@intel.com \
--cc=luca@coelho.fi \
/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.