From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 03/13] drm/i915/sdvo: s/sdvo_inputs_mask/sdvo_num_inputs/
Date: Wed, 5 Jul 2023 23:21:12 +0300 [thread overview]
Message-ID: <20230705202122.17915-4-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20230705202122.17915-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
The SDVO inputs are reportes a simple number, not a bitmask.
Adjust the code to match reality.
Note that we don't actually support dual input SDVO devices,
and we just always use the first input.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_sdvo.c | 9 ++++-----
drivers/gpu/drm/i915/display/intel_sdvo_regs.h | 2 +-
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
index ec94da6cb7bb..76eed11e9fed 100644
--- a/drivers/gpu/drm/i915/display/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
@@ -1955,7 +1955,7 @@ static bool intel_sdvo_get_capabilities(struct intel_sdvo *intel_sdvo, struct in
" device_rev_id: %d\n"
" sdvo_version_major: %d\n"
" sdvo_version_minor: %d\n"
- " sdvo_inputs_mask: %d\n"
+ " sdvo_num_inputs: %d\n"
" smooth_scaling: %d\n"
" sharp_scaling: %d\n"
" up_scaling: %d\n"
@@ -1967,7 +1967,7 @@ static bool intel_sdvo_get_capabilities(struct intel_sdvo *intel_sdvo, struct in
caps->device_rev_id,
caps->sdvo_version_major,
caps->sdvo_version_minor,
- caps->sdvo_inputs_mask,
+ caps->sdvo_num_inputs,
caps->smooth_scaling,
caps->sharp_scaling,
caps->up_scaling,
@@ -3436,15 +3436,14 @@ bool intel_sdvo_init(struct drm_i915_private *dev_priv,
drm_dbg_kms(&dev_priv->drm, "%s device VID/DID: %02X:%02X.%02X, "
"clock range %dMHz - %dMHz, "
- "input 1: %c, input 2: %c, "
+ "num inputs: %d, "
"output 1: %c, output 2: %c\n",
SDVO_NAME(intel_sdvo),
intel_sdvo->caps.vendor_id, intel_sdvo->caps.device_id,
intel_sdvo->caps.device_rev_id,
intel_sdvo->pixel_clock_min / 1000,
intel_sdvo->pixel_clock_max / 1000,
- (intel_sdvo->caps.sdvo_inputs_mask & 0x1) ? 'Y' : 'N',
- (intel_sdvo->caps.sdvo_inputs_mask & 0x2) ? 'Y' : 'N',
+ intel_sdvo->caps.sdvo_num_inputs,
/* check currently supported outputs */
intel_sdvo->caps.output_flags &
(SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_RGB0 |
diff --git a/drivers/gpu/drm/i915/display/intel_sdvo_regs.h b/drivers/gpu/drm/i915/display/intel_sdvo_regs.h
index 74dc6c042b6e..54f099abefeb 100644
--- a/drivers/gpu/drm/i915/display/intel_sdvo_regs.h
+++ b/drivers/gpu/drm/i915/display/intel_sdvo_regs.h
@@ -57,7 +57,7 @@ struct intel_sdvo_caps {
u8 device_rev_id;
u8 sdvo_version_major;
u8 sdvo_version_minor;
- unsigned int sdvo_inputs_mask:2;
+ unsigned int sdvo_num_inputs:2;
unsigned int smooth_scaling:1;
unsigned int sharp_scaling:1;
unsigned int up_scaling:1;
--
2.39.3
next prev parent reply other threads:[~2023-07-05 20:21 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 20:21 [Intel-gfx] [PATCH 00/13] drm/i915/sdvo: DDC rework and fixes Ville Syrjala
2023-07-05 20:21 ` [Intel-gfx] [PATCH 01/13] drm/i915/sdvo: Issue SetTargetOutput prior ot GetAttachedDisplays Ville Syrjala
2023-07-06 7:20 ` Jani Nikula
2023-07-05 20:21 ` [Intel-gfx] [PATCH 02/13] drm/i915/sdvo: Protect macro args Ville Syrjala
2023-07-06 7:20 ` Jani Nikula
2023-07-05 20:21 ` Ville Syrjala [this message]
2023-07-06 7:24 ` [Intel-gfx] [PATCH 03/13] drm/i915/sdvo: s/sdvo_inputs_mask/sdvo_num_inputs/ Jani Nikula
2023-07-05 20:21 ` [Intel-gfx] [PATCH 04/13] drm/i915: Don't warn about zero N/P in *_calc_dpll_params() Ville Syrjala
2023-07-06 8:17 ` Jani Nikula
2023-07-05 20:21 ` [Intel-gfx] [PATCH 05/13] drm/i915: Fully populate crtc_state->dpll Ville Syrjala
2023-07-06 8:41 ` Jani Nikula
2023-07-05 20:21 ` [Intel-gfx] [PATCH 06/13] drm/i915/sdvo: Pick the TV dotclock from adjusted_mode Ville Syrjala
2023-07-06 8:22 ` Jani Nikula
2023-07-05 20:21 ` [Intel-gfx] [PATCH 07/13] drm/i915/sdvo: Fail gracefully if the TV dotclock is out of range Ville Syrjala
2023-07-06 8:22 ` Jani Nikula
2023-07-05 20:21 ` [Intel-gfx] [PATCH 08/13] drm/i915/sdvo: Nuke attached_output tracking Ville Syrjala
2023-07-06 8:24 ` Jani Nikula
2023-07-05 20:21 ` [Intel-gfx] [PATCH 09/13] drm/i915/sdvo: Initialize the encoder ealier Ville Syrjala
2023-07-06 8:28 ` Jani Nikula
2023-07-05 20:21 ` [Intel-gfx] [PATCH 10/13] drm/i915/sdvo: Nuke the duplicate sdvo->port Ville Syrjala
2023-07-06 8:29 ` Jani Nikula
2023-07-05 20:21 ` [Intel-gfx] [PATCH 11/13] drm/i915/sdvo: Get rid of the per-connector i2c symlink Ville Syrjala
2023-07-06 8:30 ` Jani Nikula
2023-07-05 20:21 ` [Intel-gfx] [PATCH 12/13] drm/i915/sdvo: Rework DDC bus handling Ville Syrjala
2023-07-06 8:38 ` Jani Nikula
2023-07-05 20:21 ` [Intel-gfx] [PATCH 13/13] drm/i915/sdvo: Print out the i2c pin and slave address Ville Syrjala
2023-07-06 8:38 ` Jani Nikula
2023-07-05 21:24 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/sdvo: DDC rework and fixes Patchwork
2023-07-05 21:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-07-06 1:17 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-07-06 8:45 ` [Intel-gfx] [PATCH 00/13] " Jani Nikula
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=20230705202122.17915-4-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox