Commit 7347d4e4 authored by Jani Nikula's avatar Jani Nikula
Browse files

drm/i915/display: identify discrete graphics



Identify discrete graphics separately in display, using the platform
group mechanism. This enables dropping the dependency on i915_drv.h
IS_DGFX() from display code.

Start grouping platform groups separately in INTEL_DISPLAY_PLATFORMS()
in anticipation of more groups to come.

Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c02230d26cc0d9dbd7ddcc064661b2ad03739b6a.1731321183.git.jani.nikula@intel.com


Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 44499559
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1011,6 +1011,7 @@ static const enum intel_step dg1_steppings[] = {

static const struct platform_desc dg1_desc = {
	PLATFORM(dg1),
	PLATFORM_GROUP(dgfx),
	.info = &(const struct intel_display_device_info) {
		XE_D_DISPLAY,

@@ -1238,6 +1239,7 @@ static const enum intel_step dg2_g12_steppings[] = {

static const struct platform_desc dg2_desc = {
	PLATFORM(dg2),
	PLATFORM_GROUP(dgfx),
	.subplatforms = (const struct subplatform_desc[]) {
		{
			SUBPLATFORM(dg2, g10),
@@ -1338,6 +1340,7 @@ static const struct platform_desc lnl_desc = {

static const struct platform_desc bmg_desc = {
	PLATFORM(battlemage),
	PLATFORM_GROUP(dgfx),
};

static const struct platform_desc ptl_desc = {
@@ -1636,9 +1639,10 @@ void intel_display_device_probe(struct drm_i915_private *i915)

	DISPLAY_RUNTIME_INFO(i915)->step = step;

	drm_info(&i915->drm, "Found %s%s%s (device ID %04x) display version %u.%02u stepping %s\n",
	drm_info(&i915->drm, "Found %s%s%s (device ID %04x) %s display version %u.%02u stepping %s\n",
		 desc->name, subdesc ? "/" : "", subdesc ? subdesc->name : "",
		 pdev->device, DISPLAY_RUNTIME_INFO(i915)->ip.ver,
		 pdev->device, display->platform.dgfx ? "discrete" : "integrated",
		 DISPLAY_RUNTIME_INFO(i915)->ip.ver,
		 DISPLAY_RUNTIME_INFO(i915)->ip.rel,
		 step != STEP_NONE ? intel_step_name(step) : "N/A");

+3 −1
Original line number Diff line number Diff line
@@ -21,6 +21,9 @@ struct drm_printer;
 * platform.
 */
#define INTEL_DISPLAY_PLATFORMS(func) \
	/* Platform group aliases */ \
	func(g4x) /* g45 and gm45 */ \
	func(dgfx) /* discrete graphics */ \
	/* Display ver 2 */ \
	func(i830) \
	func(i845g) \
@@ -38,7 +41,6 @@ struct drm_printer;
	func(i965gm) \
	func(g45) \
	func(gm45) \
	func(g4x) /* group alias for g45 and gm45 */ \
	/* Display ver 5 */ \
	func(ironlake) \
	/* Display ver 6 */ \