Skip to content

Commit

Permalink
Merge tag 'drm-intel-next-2025-01-07' of https://gitlab.freedesktop.o…
Browse files Browse the repository at this point in the history
…rg/drm/i915/kernel into drm-next

Driver Changes:
 - Some DG2 refactor to fix DG2 bugs when operating with certain CPUs (Raag)
 - Use hw support for min/interim ddb allocation for async flip (Vinod)
 - More general code refactor to allow full display separation (Jani)
 - Expose dsc sink max slice count via debugfs (Swati)
 - Fix C10 pll programming sequence (Suraj)
 - Fix DG1 power gate sequence (Rodrigo)
 - Use preemption timeout on selftest cleanup (Janusz)
 - DP DSC related fixes (Ankit)
 - Fix HDCP compliance test (Suraj)
 - Clean and Optimise mtl_ddi_prepare_link_retrain (Suraj)
 - Adjust Added Wake Time with PKG_C_LATENCY (Animesh)
 - Enabling uncompressed 128b/132b UHBR SST (Jani)
 - Handle hdmi connector init failures, and no HDMI/DP cases (Jani)

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/Z31_WPbBoHkwgEA9@intel.com
  • Loading branch information
airlied committed Jan 9, 2025
2 parents 9cc3e4e + 1513358 commit 4695a9c
Show file tree
Hide file tree
Showing 106 changed files with 1,989 additions and 1,482 deletions.
10 changes: 2 additions & 8 deletions drivers/gpu/drm/display/drm_dp_mst_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -3572,8 +3572,7 @@ static int drm_dp_send_up_ack_reply(struct drm_dp_mst_topology_mgr *mgr,
}

/**
* drm_dp_get_vc_payload_bw - get the VC payload BW for an MST link
* @mgr: The &drm_dp_mst_topology_mgr to use
* drm_dp_get_vc_payload_bw - get the VC payload BW for an MTP link
* @link_rate: link rate in 10kbits/s units
* @link_lane_count: lane count
*
Expand All @@ -3584,17 +3583,12 @@ static int drm_dp_send_up_ack_reply(struct drm_dp_mst_topology_mgr *mgr,
*
* Returns the BW / timeslot value in 20.12 fixed point format.
*/
fixed20_12 drm_dp_get_vc_payload_bw(const struct drm_dp_mst_topology_mgr *mgr,
int link_rate, int link_lane_count)
fixed20_12 drm_dp_get_vc_payload_bw(int link_rate, int link_lane_count)
{
int ch_coding_efficiency =
drm_dp_bw_channel_coding_efficiency(drm_dp_is_uhbr_rate(link_rate));
fixed20_12 ret;

if (link_rate == 0 || link_lane_count == 0)
drm_dbg_kms(mgr->dev, "invalid link rate/lane count: (%d / %d)\n",
link_rate, link_lane_count);

/* See DP v2.0 2.6.4.2, 2.7.6.3 VCPayload_Bandwidth_for_OneTimeSlotPer_MTP_Allocation */
ret.full = DIV_ROUND_DOWN_ULL(mul_u32_u32(link_rate * link_lane_count,
ch_coding_efficiency),
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ i915-y += \
i915_sysfs.o \
i915_utils.o \
intel_clock_gating.o \
intel_cpu_info.o \
intel_device_info.o \
intel_memory_region.o \
intel_pcode.o \
Expand All @@ -42,6 +43,7 @@ i915-y += \
intel_sbi.o \
intel_step.o \
intel_uncore.o \
intel_uncore_trace.o \
intel_wakeref.o \
vlv_sideband.o \
vlv_suspend.o
Expand Down Expand Up @@ -236,6 +238,7 @@ i915-y += \
display/intel_crtc_state_dump.o \
display/intel_cursor.o \
display/intel_display.o \
display/intel_display_conversion.o \
display/intel_display_driver.o \
display/intel_display_irq.o \
display/intel_display_params.o \
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/dvo_ns2501.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
*
*/

#include "i915_drv.h"
#include "intel_display_types.h"
#include "intel_dvo_dev.h"

Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/display/g4x_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <linux/string_helpers.h>

#include "g4x_dp.h"
#include "i915_drv.h"
#include "i915_reg.h"
#include "intel_audio.h"
#include "intel_backlight.h"
Expand Down
36 changes: 24 additions & 12 deletions drivers/gpu/drm/i915/display/g4x_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#include "g4x_hdmi.h"
#include "i915_drv.h"
#include "i915_reg.h"
#include "intel_atomic.h"
#include "intel_audio.h"
Expand Down Expand Up @@ -682,7 +683,7 @@ static bool assert_hdmi_port_valid(struct drm_i915_private *i915, enum port port
"Platform does not support HDMI %c\n", port_name(port));
}

void g4x_hdmi_init(struct drm_i915_private *dev_priv,
bool g4x_hdmi_init(struct drm_i915_private *dev_priv,
i915_reg_t hdmi_reg, enum port port)
{
struct intel_display *display = &dev_priv->display;
Expand All @@ -692,10 +693,10 @@ void g4x_hdmi_init(struct drm_i915_private *dev_priv,
struct intel_connector *intel_connector;

if (!assert_port_valid(dev_priv, port))
return;
return false;

if (!assert_hdmi_port_valid(dev_priv, port))
return;
return false;

devdata = intel_bios_encoder_data_lookup(display, port);

Expand All @@ -706,25 +707,24 @@ void g4x_hdmi_init(struct drm_i915_private *dev_priv,

dig_port = kzalloc(sizeof(*dig_port), GFP_KERNEL);
if (!dig_port)
return;
return false;

dig_port->aux_ch = AUX_CH_NONE;

intel_connector = intel_connector_alloc();
if (!intel_connector) {
kfree(dig_port);
return;
}
if (!intel_connector)
goto err_connector_alloc;

intel_encoder = &dig_port->base;

intel_encoder->devdata = devdata;

mutex_init(&dig_port->hdcp_mutex);

drm_encoder_init(&dev_priv->drm, &intel_encoder->base,
&intel_hdmi_enc_funcs, DRM_MODE_ENCODER_TMDS,
"HDMI %c", port_name(port));
if (drm_encoder_init(&dev_priv->drm, &intel_encoder->base,
&intel_hdmi_enc_funcs, DRM_MODE_ENCODER_TMDS,
"HDMI %c", port_name(port)))
goto err_encoder_init;

intel_encoder->hotplug = intel_hdmi_hotplug;
intel_encoder->compute_config = g4x_hdmi_compute_config;
Expand Down Expand Up @@ -787,5 +787,17 @@ void g4x_hdmi_init(struct drm_i915_private *dev_priv,

intel_infoframe_init(dig_port);

intel_hdmi_init_connector(dig_port, intel_connector);
if (!intel_hdmi_init_connector(dig_port, intel_connector))
goto err_init_connector;

return true;

err_init_connector:
drm_encoder_cleanup(&intel_encoder->base);
err_encoder_init:
kfree(intel_connector);
err_connector_alloc:
kfree(dig_port);

return false;
}
5 changes: 3 additions & 2 deletions drivers/gpu/drm/i915/display/g4x_hdmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ struct drm_connector;
struct drm_i915_private;

#ifdef I915
void g4x_hdmi_init(struct drm_i915_private *dev_priv,
bool g4x_hdmi_init(struct drm_i915_private *dev_priv,
i915_reg_t hdmi_reg, enum port port);
int g4x_hdmi_connector_atomic_check(struct drm_connector *connector,
struct drm_atomic_state *state);
#else
static inline void g4x_hdmi_init(struct drm_i915_private *dev_priv,
static inline bool g4x_hdmi_init(struct drm_i915_private *dev_priv,
i915_reg_t hdmi_reg, int port)
{
return false;
}
static inline int g4x_hdmi_connector_atomic_check(struct drm_connector *connector,
struct drm_atomic_state *state)
Expand Down
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/display/i9xx_display_sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
* Copyright © 2024 Intel Corporation
*/

#include "i915_drv.h"
#include <drm/drm_device.h>

#include "i915_reg.h"
#include "i9xx_display_sr.h"
#include "i9xx_wm_regs.h"
#include "intel_de.h"
#include "intel_gmbus.h"
#include "intel_pci_config.h"
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/display/i9xx_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <drm/drm_blend.h>
#include <drm/drm_fourcc.h>

#include "i915_drv.h"
#include "i915_reg.h"
#include "i9xx_plane.h"
#include "i9xx_plane_regs.h"
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/display/i9xx_wm.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "i915_drv.h"
#include "i915_reg.h"
#include "i9xx_wm.h"
#include "i9xx_wm_regs.h"
#include "intel_atomic.h"
#include "intel_bo.h"
#include "intel_display.h"
Expand Down
Loading

0 comments on commit 4695a9c

Please sign in to comment.