Skip to content

Commit

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

drm/i915 feature pull #2 for v6.15:

Features and functionality:
- FBC dirty rectangle support for display version 30+ (Vinod)
- Update plane scalers via DSB based commits (Ville)
- Move runtime power status info to display power debugfs (Jani)

Refactoring and cleanups:
- Convert i915 and xe to DRM client setup (Thomas)
- Refactor and clean up CDCLK/bw/dbuf readout/sanitation (Ville)
- Conversions from drm_i915_private to struct intel_display (Jani, Suraj)
- Refactor display reset for better separation between display and core (Jani)
- Move panel fitter code together (Jani)
- Add mst and hdcp sub-structs to display structs for clarity (Jani)
- Header refactoring to clarify separation between display and i915 core (Jani)

Fixes:
- Fix DP MST max stream count to match number of pipes (Jani)
- Fix encoder HW state readout of DP MST UHBR (Imre)
- Fix ICL+ combo PHY cursor and coeff polarity programming (Ville)
- Fix pipeDMC and ATS fault handling (Ville)
- Display workarounds (Gustavo)
- Remove duplicate forward declaration (Vinod)
- Improve POWER_DOMAIN_*() macro type safety (Gustavo)
- Move CDCLK post plane programming later (Ville)

DRM core changes:
- Add client-hotplug helper (Thomas)
- Send pending hotplug events after client resume (Thomas)
- Add fb_restore and fb_set_suspend fb helper hooks (Thomas)
- Remove struct fb_probe fb helper hook (Thomas)
- Add const qualifier to drm_atomic_helper_damage_merged() (Vinod)

Xe driver changes:
- Convert i915 and xe to DRM client setup (Thomas)
- Refactor i915 compat headers (Jani)
- Fix fbdev GGTT mapping handling (Maarten)
- Figure out pxp instance from the gem object (Jani)

Merges:
- Backmerge drm-next to fix conflicts with drm-xe-next (Jani)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87o6y9gpub.fsf@intel.com
  • Loading branch information
Dave Airlie committed Mar 11, 2025
2 parents 11a5c64 + bb800b5 commit e5dc4f6
Show file tree
Hide file tree
Showing 124 changed files with 2,545 additions and 2,374 deletions.
41 changes: 28 additions & 13 deletions drivers/gpu/drm/drm_client_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,29 @@ void drm_client_dev_unregister(struct drm_device *dev)
}
EXPORT_SYMBOL(drm_client_dev_unregister);

static void drm_client_hotplug(struct drm_client_dev *client)
{
struct drm_device *dev = client->dev;
int ret;

if (!client->funcs || !client->funcs->hotplug)
return;

if (client->hotplug_failed)
return;

if (client->suspended) {
client->hotplug_pending = true;
return;
}

client->hotplug_pending = false;
ret = client->funcs->hotplug(client);
drm_dbg_kms(dev, "%s: ret=%d\n", client->name, ret);
if (ret)
client->hotplug_failed = true;
}

/**
* drm_client_dev_hotplug - Send hotplug event to clients
* @dev: DRM device
Expand All @@ -61,7 +84,6 @@ EXPORT_SYMBOL(drm_client_dev_unregister);
void drm_client_dev_hotplug(struct drm_device *dev)
{
struct drm_client_dev *client;
int ret;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return;
Expand All @@ -72,18 +94,8 @@ void drm_client_dev_hotplug(struct drm_device *dev)
}

mutex_lock(&dev->clientlist_mutex);
list_for_each_entry(client, &dev->clientlist, list) {
if (!client->funcs || !client->funcs->hotplug)
continue;

if (client->hotplug_failed)
continue;

ret = client->funcs->hotplug(client);
drm_dbg_kms(dev, "%s: ret=%d\n", client->name, ret);
if (ret)
client->hotplug_failed = true;
}
list_for_each_entry(client, &dev->clientlist, list)
drm_client_hotplug(client);
mutex_unlock(&dev->clientlist_mutex);
}
EXPORT_SYMBOL(drm_client_dev_hotplug);
Expand Down Expand Up @@ -153,6 +165,9 @@ static int drm_client_resume(struct drm_client_dev *client, bool holds_console_l

client->suspended = false;

if (client->hotplug_pending)
drm_client_hotplug(client);

return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_damage_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ EXPORT_SYMBOL(drm_atomic_helper_damage_iter_next);
* True if there is valid plane damage otherwise false.
*/
bool drm_atomic_helper_damage_merged(const struct drm_plane_state *old_state,
struct drm_plane_state *state,
const struct drm_plane_state *state,
struct drm_rect *rect)
{
struct drm_atomic_helper_damage_iter iter;
Expand Down
20 changes: 14 additions & 6 deletions drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ __drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper,
if (do_delayed)
drm_fb_helper_hotplug_event(fb_helper);

if (fb_helper->funcs->fb_restore)
fb_helper->funcs->fb_restore(fb_helper);

return ret;
}

Expand Down Expand Up @@ -754,7 +757,12 @@ EXPORT_SYMBOL(drm_fb_helper_deferred_io);
*/
void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, bool suspend)
{
if (fb_helper && fb_helper->info)
if (!fb_helper || !fb_helper->info)
return;

if (fb_helper->funcs->fb_set_suspend)
fb_helper->funcs->fb_set_suspend(fb_helper, suspend);
else
fb_set_suspend(fb_helper->info, suspend);
}
EXPORT_SYMBOL(drm_fb_helper_set_suspend);
Expand Down Expand Up @@ -800,7 +808,7 @@ void drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper,
}
}

fb_set_suspend(fb_helper->info, suspend);
drm_fb_helper_set_suspend(fb_helper, suspend);
console_unlock();
}
EXPORT_SYMBOL(drm_fb_helper_set_suspend_unlocked);
Expand Down Expand Up @@ -1626,6 +1634,9 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper)
struct fb_info *info;
int ret;

if (drm_WARN_ON(dev, !dev->driver->fbdev_probe))
return -EINVAL;

ret = drm_fb_helper_find_sizes(fb_helper, &sizes);
if (ret) {
/* First time: disable all crtc's.. */
Expand All @@ -1635,10 +1646,7 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper)
}

/* push down into drivers */
if (dev->driver->fbdev_probe)
ret = dev->driver->fbdev_probe(fb_helper, &sizes);
else if (fb_helper->funcs)
ret = fb_helper->funcs->fb_probe(fb_helper, &sizes);
ret = dev->driver->fbdev_probe(fb_helper, &sizes);
if (ret < 0)
return ret;

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/display/g4x_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ bool g4x_dp_init(struct intel_display *display,

intel_encoder->devdata = devdata;

mutex_init(&dig_port->hdcp_mutex);
mutex_init(&dig_port->hdcp.mutex);

if (drm_encoder_init(display->drm, &intel_encoder->base,
&intel_dp_enc_funcs, DRM_MODE_ENCODER_TMDS,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/display/g4x_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ bool g4x_hdmi_init(struct intel_display *display,

intel_encoder->devdata = devdata;

mutex_init(&dig_port->hdcp_mutex);
mutex_init(&dig_port->hdcp.mutex);

if (drm_encoder_init(display->drm, &intel_encoder->base,
&intel_hdmi_enc_funcs, DRM_MODE_ENCODER_TMDS,
Expand Down
18 changes: 4 additions & 14 deletions drivers/gpu/drm/i915/display/i9xx_wm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3902,12 +3902,6 @@ static void g4x_wm_sanitize(struct drm_i915_private *dev_priv)
mutex_unlock(&dev_priv->display.wm.wm_mutex);
}

static void g4x_wm_get_hw_state_and_sanitize(struct drm_i915_private *i915)
{
g4x_wm_get_hw_state(i915);
g4x_wm_sanitize(i915);
}

static void vlv_wm_get_hw_state(struct drm_i915_private *dev_priv)
{
struct vlv_wm_values *wm = &dev_priv->display.wm.vlv;
Expand Down Expand Up @@ -4055,12 +4049,6 @@ static void vlv_wm_sanitize(struct drm_i915_private *dev_priv)
mutex_unlock(&dev_priv->display.wm.wm_mutex);
}

static void vlv_wm_get_hw_state_and_sanitize(struct drm_i915_private *i915)
{
vlv_wm_get_hw_state(i915);
vlv_wm_sanitize(i915);
}

/*
* FIXME should probably kill this and improve
* the real watermark readout/sanitation instead
Expand Down Expand Up @@ -4122,14 +4110,16 @@ static const struct intel_wm_funcs vlv_wm_funcs = {
.initial_watermarks = vlv_initial_watermarks,
.optimize_watermarks = vlv_optimize_watermarks,
.atomic_update_watermarks = vlv_atomic_update_fifo,
.get_hw_state = vlv_wm_get_hw_state_and_sanitize,
.get_hw_state = vlv_wm_get_hw_state,
.sanitize = vlv_wm_sanitize,
};

static const struct intel_wm_funcs g4x_wm_funcs = {
.compute_watermarks = g4x_compute_watermarks,
.initial_watermarks = g4x_initial_watermarks,
.optimize_watermarks = g4x_optimize_watermarks,
.get_hw_state = g4x_wm_get_hw_state_and_sanitize,
.get_hw_state = g4x_wm_get_hw_state,
.sanitize = g4x_wm_sanitize,
};

static const struct intel_wm_funcs pnv_wm_funcs = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/display/icl_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1647,7 +1647,7 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,
if (ret)
return ret;

ret = intel_panel_fitting(pipe_config, conn_state);
ret = intel_pfit_compute_config(pipe_config, conn_state);
if (ret)
return ret;

Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/display/intel_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <linux/acpi.h>
#include <acpi/video.h>

#include <drm/drm_print.h>

#include "i915_utils.h"
#include "intel_acpi.h"
#include "intel_display_core.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ struct drm_connector_state;
struct drm_crtc;
struct drm_crtc_state;
struct drm_device;
struct drm_i915_private;
struct drm_property;
struct intel_atomic_state;
struct intel_connector;
Expand Down
Loading

0 comments on commit e5dc4f6

Please sign in to comment.