mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 07:51:16 -04:00
drm/i915/display: convert HAS_ULTRAJOINER() to struct intel_display
Convert HAS_ULTRAJOINER() to struct intel_display. Do minimal drive-by conversions to struct intel_display in the callers while at it. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/f562d35c94cf7ef18d261a9867d959a58f165f1e.1731321183.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -3746,12 +3746,13 @@ static u8 fixup_ultrajoiner_secondary_pipes(u8 ultrajoiner_primary_pipes,
|
||||
static void enabled_ultrajoiner_pipes(struct drm_i915_private *i915,
|
||||
u8 *primary_pipes, u8 *secondary_pipes)
|
||||
{
|
||||
struct intel_display *display = &i915->display;
|
||||
struct intel_crtc *crtc;
|
||||
|
||||
*primary_pipes = 0;
|
||||
*secondary_pipes = 0;
|
||||
|
||||
if (!HAS_ULTRAJOINER(i915))
|
||||
if (!HAS_ULTRAJOINER(display))
|
||||
return;
|
||||
|
||||
for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc,
|
||||
@@ -8310,11 +8311,12 @@ void intel_setup_outputs(struct drm_i915_private *dev_priv)
|
||||
|
||||
static int max_dotclock(struct drm_i915_private *i915)
|
||||
{
|
||||
int max_dotclock = i915->display.cdclk.max_dotclk_freq;
|
||||
struct intel_display *display = &i915->display;
|
||||
int max_dotclock = display->cdclk.max_dotclk_freq;
|
||||
|
||||
if (HAS_ULTRAJOINER(i915))
|
||||
if (HAS_ULTRAJOINER(display))
|
||||
max_dotclock *= 4;
|
||||
else if (HAS_UNCOMPRESSED_JOINER(i915) || HAS_BIGJOINER(i915))
|
||||
else if (HAS_UNCOMPRESSED_JOINER(display) || HAS_BIGJOINER(display))
|
||||
max_dotclock *= 2;
|
||||
|
||||
return max_dotclock;
|
||||
|
||||
@@ -1331,7 +1331,7 @@ static ssize_t i915_joiner_write(struct file *file,
|
||||
{
|
||||
struct seq_file *m = file->private_data;
|
||||
struct intel_connector *connector = m->private;
|
||||
struct drm_i915_private *i915 = to_i915(connector->base.dev);
|
||||
struct intel_display *display = to_intel_display(connector);
|
||||
int force_joined_pipes = 0;
|
||||
int ret;
|
||||
|
||||
@@ -1349,7 +1349,7 @@ static ssize_t i915_joiner_write(struct file *file,
|
||||
connector->force_joined_pipes = force_joined_pipes;
|
||||
break;
|
||||
case 4:
|
||||
if (HAS_ULTRAJOINER(i915)) {
|
||||
if (HAS_ULTRAJOINER(display)) {
|
||||
connector->force_joined_pipes = force_joined_pipes;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -180,9 +180,9 @@ struct intel_display_platforms {
|
||||
#define HAS_TRANSCODER(i915, trans) ((DISPLAY_RUNTIME_INFO(i915)->cpu_transcoder_mask & \
|
||||
BIT(trans)) != 0)
|
||||
#define HAS_UNCOMPRESSED_JOINER(i915) (DISPLAY_VER(i915) >= 13)
|
||||
#define HAS_ULTRAJOINER(i915) ((DISPLAY_VER(i915) >= 20 || \
|
||||
(IS_DGFX(i915) && DISPLAY_VER(i915) == 14)) && \
|
||||
HAS_DSC(i915))
|
||||
#define HAS_ULTRAJOINER(__display) ((DISPLAY_VER(__display) >= 20 || \
|
||||
((__display)->platform.dgfx && DISPLAY_VER(__display) == 14)) && \
|
||||
HAS_DSC(__display))
|
||||
#define HAS_VRR(i915) (DISPLAY_VER(i915) >= 11)
|
||||
#define HAS_AS_SDP(i915) (DISPLAY_VER(i915) >= 13)
|
||||
#define HAS_CMRR(i915) (DISPLAY_VER(i915) >= 20)
|
||||
|
||||
@@ -1352,16 +1352,15 @@ int intel_dp_num_joined_pipes(struct intel_dp *intel_dp,
|
||||
int hdisplay, int clock)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(intel_dp);
|
||||
struct drm_i915_private *i915 = to_i915(display->drm);
|
||||
|
||||
if (connector->force_joined_pipes)
|
||||
return connector->force_joined_pipes;
|
||||
|
||||
if (HAS_ULTRAJOINER(i915) &&
|
||||
if (HAS_ULTRAJOINER(display) &&
|
||||
intel_dp_needs_joiner(intel_dp, connector, hdisplay, clock, 4))
|
||||
return 4;
|
||||
|
||||
if ((HAS_BIGJOINER(i915) || HAS_UNCOMPRESSED_JOINER(i915)) &&
|
||||
if ((HAS_BIGJOINER(display) || HAS_UNCOMPRESSED_JOINER(display)) &&
|
||||
intel_dp_needs_joiner(intel_dp, connector, hdisplay, clock, 2))
|
||||
return 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user