Commit a5f207e2 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-fixes-2026-01-07' of...

Merge tag 'drm-misc-fixes-2026-01-07' of https://gitlab.freedesktop.org/drm/misc/kernel

 into drm-fixes

drm-misc-fixes for v6.19-rc5:

pl111:
- Fix error handling in probe

mediatek/atomic/tidss:
- Fix tidss in another way and revert reordering of pre-enable and post-disable operations,
  as it breaks other bridge drivers.

nouveau:
- Fix regression from fwsec s/r fix.

pci/vga:
- Fix multiple gpu's being reported a 'boot_display'

fb-helper:
- Fix vblank timeout during suspend/reset

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

From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patch.msgid.link/f50067e6-243a-4ed8-9781-1e4e4fdebc8e@linux.intel.com
parents 50cf611b d5bdf88d
Loading
Loading
Loading
Loading
+99 −23
Original line number Diff line number Diff line
@@ -1162,8 +1162,18 @@ crtc_needs_disable(struct drm_crtc_state *old_state,
	       new_state->self_refresh_active;
}

static void
encoder_bridge_disable(struct drm_device *dev, struct drm_atomic_state *state)
/**
 * drm_atomic_helper_commit_encoder_bridge_disable - disable bridges and encoder
 * @dev: DRM device
 * @state: the driver state object
 *
 * Loops over all connectors in the current state and if the CRTC needs
 * it, disables the bridge chain all the way, then disables the encoder
 * afterwards.
 */
void
drm_atomic_helper_commit_encoder_bridge_disable(struct drm_device *dev,
						struct drm_atomic_state *state)
{
	struct drm_connector *connector;
	struct drm_connector_state *old_conn_state, *new_conn_state;
@@ -1229,9 +1239,18 @@ encoder_bridge_disable(struct drm_device *dev, struct drm_atomic_state *state)
		}
	}
}
EXPORT_SYMBOL(drm_atomic_helper_commit_encoder_bridge_disable);

static void
crtc_disable(struct drm_device *dev, struct drm_atomic_state *state)
/**
 * drm_atomic_helper_commit_crtc_disable - disable CRTSs
 * @dev: DRM device
 * @state: the driver state object
 *
 * Loops over all CRTCs in the current state and if the CRTC needs
 * it, disables it.
 */
void
drm_atomic_helper_commit_crtc_disable(struct drm_device *dev, struct drm_atomic_state *state)
{
	struct drm_crtc *crtc;
	struct drm_crtc_state *old_crtc_state, *new_crtc_state;
@@ -1282,9 +1301,18 @@ crtc_disable(struct drm_device *dev, struct drm_atomic_state *state)
			drm_crtc_vblank_put(crtc);
	}
}
EXPORT_SYMBOL(drm_atomic_helper_commit_crtc_disable);

static void
encoder_bridge_post_disable(struct drm_device *dev, struct drm_atomic_state *state)
/**
 * drm_atomic_helper_commit_encoder_bridge_post_disable - post-disable encoder bridges
 * @dev: DRM device
 * @state: the driver state object
 *
 * Loops over all connectors in the current state and if the CRTC needs
 * it, post-disables all encoder bridges.
 */
void
drm_atomic_helper_commit_encoder_bridge_post_disable(struct drm_device *dev, struct drm_atomic_state *state)
{
	struct drm_connector *connector;
	struct drm_connector_state *old_conn_state, *new_conn_state;
@@ -1335,15 +1363,16 @@ encoder_bridge_post_disable(struct drm_device *dev, struct drm_atomic_state *sta
		drm_bridge_put(bridge);
	}
}
EXPORT_SYMBOL(drm_atomic_helper_commit_encoder_bridge_post_disable);

static void
disable_outputs(struct drm_device *dev, struct drm_atomic_state *state)
{
	encoder_bridge_disable(dev, state);
	drm_atomic_helper_commit_encoder_bridge_disable(dev, state);

	crtc_disable(dev, state);
	drm_atomic_helper_commit_encoder_bridge_post_disable(dev, state);

	encoder_bridge_post_disable(dev, state);
	drm_atomic_helper_commit_crtc_disable(dev, state);
}

/**
@@ -1446,8 +1475,17 @@ void drm_atomic_helper_calc_timestamping_constants(struct drm_atomic_state *stat
}
EXPORT_SYMBOL(drm_atomic_helper_calc_timestamping_constants);

static void
crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *state)
/**
 * drm_atomic_helper_commit_crtc_set_mode - set the new mode
 * @dev: DRM device
 * @state: the driver state object
 *
 * Loops over all connectors in the current state and if the mode has
 * changed, change the mode of the CRTC, then call down the bridge
 * chain and change the mode in all bridges as well.
 */
void
drm_atomic_helper_commit_crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *state)
{
	struct drm_crtc *crtc;
	struct drm_crtc_state *new_crtc_state;
@@ -1508,6 +1546,7 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *state)
		drm_bridge_put(bridge);
	}
}
EXPORT_SYMBOL(drm_atomic_helper_commit_crtc_set_mode);

/**
 * drm_atomic_helper_commit_modeset_disables - modeset commit to disable outputs
@@ -1531,11 +1570,20 @@ void drm_atomic_helper_commit_modeset_disables(struct drm_device *dev,
	drm_atomic_helper_update_legacy_modeset_state(dev, state);
	drm_atomic_helper_calc_timestamping_constants(state);

	crtc_set_mode(dev, state);
	drm_atomic_helper_commit_crtc_set_mode(dev, state);
}
EXPORT_SYMBOL(drm_atomic_helper_commit_modeset_disables);

static void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
/**
 * drm_atomic_helper_commit_writebacks - issue writebacks
 * @dev: DRM device
 * @state: atomic state object being committed
 *
 * This loops over the connectors, checks if the new state requires
 * a writeback job to be issued and in that case issues an atomic
 * commit on each connector.
 */
void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
					 struct drm_atomic_state *state)
{
	struct drm_connector *connector;
@@ -1555,9 +1603,18 @@ static void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
		}
	}
}
EXPORT_SYMBOL(drm_atomic_helper_commit_writebacks);

static void
encoder_bridge_pre_enable(struct drm_device *dev, struct drm_atomic_state *state)
/**
 * drm_atomic_helper_commit_encoder_bridge_pre_enable - pre-enable bridges
 * @dev: DRM device
 * @state: atomic state object being committed
 *
 * This loops over the connectors and if the CRTC needs it, pre-enables
 * the entire bridge chain.
 */
void
drm_atomic_helper_commit_encoder_bridge_pre_enable(struct drm_device *dev, struct drm_atomic_state *state)
{
	struct drm_connector *connector;
	struct drm_connector_state *new_conn_state;
@@ -1588,9 +1645,18 @@ encoder_bridge_pre_enable(struct drm_device *dev, struct drm_atomic_state *state
		drm_bridge_put(bridge);
	}
}
EXPORT_SYMBOL(drm_atomic_helper_commit_encoder_bridge_pre_enable);

static void
crtc_enable(struct drm_device *dev, struct drm_atomic_state *state)
/**
 * drm_atomic_helper_commit_crtc_enable - enables the CRTCs
 * @dev: DRM device
 * @state: atomic state object being committed
 *
 * This loops over CRTCs in the new state, and of the CRTC needs
 * it, enables it.
 */
void
drm_atomic_helper_commit_crtc_enable(struct drm_device *dev, struct drm_atomic_state *state)
{
	struct drm_crtc *crtc;
	struct drm_crtc_state *old_crtc_state;
@@ -1619,9 +1685,18 @@ crtc_enable(struct drm_device *dev, struct drm_atomic_state *state)
		}
	}
}
EXPORT_SYMBOL(drm_atomic_helper_commit_crtc_enable);

static void
encoder_bridge_enable(struct drm_device *dev, struct drm_atomic_state *state)
/**
 * drm_atomic_helper_commit_encoder_bridge_enable - enables the bridges
 * @dev: DRM device
 * @state: atomic state object being committed
 *
 * This loops over all connectors in the new state, and of the CRTC needs
 * it, enables the entire bridge chain.
 */
void
drm_atomic_helper_commit_encoder_bridge_enable(struct drm_device *dev, struct drm_atomic_state *state)
{
	struct drm_connector *connector;
	struct drm_connector_state *new_conn_state;
@@ -1664,6 +1739,7 @@ encoder_bridge_enable(struct drm_device *dev, struct drm_atomic_state *state)
		drm_bridge_put(bridge);
	}
}
EXPORT_SYMBOL(drm_atomic_helper_commit_encoder_bridge_enable);

/**
 * drm_atomic_helper_commit_modeset_enables - modeset commit to enable outputs
@@ -1682,11 +1758,11 @@ encoder_bridge_enable(struct drm_device *dev, struct drm_atomic_state *state)
void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
					      struct drm_atomic_state *state)
{
	encoder_bridge_pre_enable(dev, state);
	drm_atomic_helper_commit_crtc_enable(dev, state);

	crtc_enable(dev, state);
	drm_atomic_helper_commit_encoder_bridge_pre_enable(dev, state);

	encoder_bridge_enable(dev, state);
	drm_atomic_helper_commit_encoder_bridge_enable(dev, state);

	drm_atomic_helper_commit_writebacks(dev, state);
}
+10 −0
Original line number Diff line number Diff line
@@ -366,6 +366,9 @@ static void drm_fb_helper_damage_work(struct work_struct *work)
{
	struct drm_fb_helper *helper = container_of(work, struct drm_fb_helper, damage_work);

	if (helper->info->state != FBINFO_STATE_RUNNING)
		return;

	drm_fb_helper_fb_dirty(helper);
}

@@ -732,6 +735,13 @@ void drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper,
		if (fb_helper->info->state != FBINFO_STATE_RUNNING)
			return;

		/*
		 * Cancel pending damage work. During GPU reset, VBlank
		 * interrupts are disabled and drm_fb_helper_fb_dirty()
		 * would wait for VBlank timeout otherwise.
		 */
		cancel_work_sync(&fb_helper->damage_work);

		console_lock();

	} else {
+0 −6
Original line number Diff line number Diff line
@@ -1002,12 +1002,6 @@ static int mtk_dsi_host_attach(struct mipi_dsi_host *host,
			return PTR_ERR(dsi->next_bridge);
	}

	/*
	 * set flag to request the DSI host bridge be pre-enabled before device bridge
	 * in the chain, so the DSI host is ready when the device bridge is pre-enabled
	 */
	dsi->next_bridge->pre_enable_prev_first = true;

	drm_bridge_add(&dsi->bridge);

	ret = component_add(host->dev, &mtk_dsi_component_ops);
+3 −0
Original line number Diff line number Diff line
@@ -30,6 +30,9 @@ ad102_gsp = {

	.booter.ctor = ga102_gsp_booter_ctor,

	.fwsec_sb.ctor = tu102_gsp_fwsec_sb_ctor,
	.fwsec_sb.dtor = tu102_gsp_fwsec_sb_dtor,

	.dtor = r535_gsp_dtor,
	.oneinit = tu102_gsp_oneinit,
	.init = tu102_gsp_init,
+1 −7
Original line number Diff line number Diff line
@@ -337,18 +337,12 @@ nvkm_gsp_fwsec_sb(struct nvkm_gsp *gsp)
}

int
nvkm_gsp_fwsec_sb_ctor(struct nvkm_gsp *gsp)
nvkm_gsp_fwsec_sb_init(struct nvkm_gsp *gsp)
{
	return nvkm_gsp_fwsec_init(gsp, &gsp->fws.falcon.sb, "fwsec-sb",
				   NVFW_FALCON_APPIF_DMEMMAPPER_CMD_SB);
}

void
nvkm_gsp_fwsec_sb_dtor(struct nvkm_gsp *gsp)
{
	nvkm_falcon_fw_dtor(&gsp->fws.falcon.sb);
}

int
nvkm_gsp_fwsec_frts(struct nvkm_gsp *gsp)
{
Loading