Skip to contentSkip to conversation

drm/i915: Remove unnecessary () used with WARN()

PATCH In review Damien Lespiau 4 participants 6 messages Jun 4, 2015 – Jun 15, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915: Remove unnecessary () used with WARN()

In Linux, macros are usually well done and protect their arguments properly, even avoiding multiple evaluations of the parameters. Extra () are really not needed.

---
 drivers/gpu/drm/i915/intel_csr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_csr.c +2 -1
index 5cb8cc1..aae0652 100644
@@ -459,7 +459,8 @@ void intel_csr_ucode_fini(struct drm_device *dev)
 
 void assert_csr_loaded(struct drm_i915_private *dev_priv)
 {
-	WARN((intel_csr_load_status_get(dev_priv) != FW_LOADED), "CSR is not loaded.\n");
+	WARN(intel_csr_load_status_get(dev_priv) != FW_LOADED,
+	     "CSR is not loaded.\n");
 	WARN(!I915_READ(CSR_PROGRAM_BASE),
 				"CSR program storage start is NULL\n");
 	WARN(!I915_READ(CSR_SSP_BASE), "CSR SSP Base Not fine\n");
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/2 drm/i915/skl: Add debug messages at the start/end of DMC firmware loading

It's handy to have debug message for the "big" events and this one qualifies IMHO. Also helpful to see what's happening while we're loading the firwmare and how much time it takes.

---
 drivers/gpu/drm/i915/intel_csr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_csr.c +3 -0
index aae0652..2cf25ee 100644
@@ -389,6 +389,7 @@ static void finish_csr_load(const struct firmware *fw, void *context)
 	intel_csr_load_program(dev);
 	fw_loaded = true;
 
+	DRM_DEBUG_KMS("Finished loading %s\n", dev_priv->csr.fw_path);
 out:
 	if (fw_loaded)
 		intel_runtime_pm_put(dev_priv);
@@ -422,6 +423,8 @@ void intel_csr_ucode_init(struct drm_device *dev)
 		return;
 	}
 
+	DRM_DEBUG_KMS("Loading %s\n", csr->fw_path);
+
 	/*
 	 * Obtain a runtime pm reference, until CSR is loaded,
 	 * to avoid entering runtime-suspend.
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [PATCH 2/2] drm/i915/skl: Add debug messages at the start/end of DMC firmware loading

Quoted 14 lines · Damien Lespiau

It's handy to have debug message for the "big" events and this one qualifies IMHO. Also helpful to see what's happening while we're loading the firwmare and how much time it takes.

---
 drivers/gpu/drm/i915/intel_csr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_csr.c +0 -0
index aae0652..2cf25ee 100644

drivers/gpu/drm/i915/intel_csr.c static void finish_csr_load(const struct firmware *fw, void *context) · line 392

Quoted 4 lines
drivers/gpu/drm/i915/intel_csr.c +1 -0
@@ -389,6 +389,7 @@ static void finish_csr_load(const struct firmware *fw, void *context)
 	intel_csr_load_program(dev);
 	fw_loaded = true;
 
+	DRM_DEBUG_KMS("Finished loading %s\n", dev_priv->csr.fw_path);

KMS? DRM_DEBUG_DRIVER() as it is off wider scope.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH 2/2] drm/i915/skl: Add debug messages at the start/end of DMC firmware loading

Quoted 18 lines · Chris Wilson
Quoted 17 lines · Damien Lespiau

It's handy to have debug message for the "big" events and this one qualifies IMHO. Also helpful to see what's happening while we're loading the firwmare and how much time it takes.

---
 drivers/gpu/drm/i915/intel_csr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_csr.c +0 -0
index aae0652..2cf25ee 100644
@@ -389,6 +389,7 @@ static void finish_csr_load(const struct firmware *fw, void *context)
 	intel_csr_load_program(dev);
 	fw_loaded = true;
 
Quoted 3 lines

drivers/gpu/drm/i915/intel_csr.c static void finish_csr_load(const struct firmware *fw, void *context) · line 392

Quoted 1 line
drivers/gpu/drm/i915/intel_csr.c +1 -0
+	DRM_DEBUG_KMS("Finished loading %s\n", dev_priv->csr.fw_path);

KMS? DRM_DEBUG_DRIVER() as it is off wider scope.

Is it? AFAIK the DMC is all about saving/restoring display registers when we toggle the power wells between frame updates for eDP + PSR panels.

But then I guess the loading itself is a generic driver function.

Signature · 5 lines
Damien
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

Re: [PATCH 2/2] drm/i915/skl: Add debug messages at the start/end of DMC firmware loading

Quoted 23 lines · Damien Lespiau
Quoted 18 lines · Chris Wilson
Quoted 17 lines · Damien Lespiau

It's handy to have debug message for the "big" events and this one qualifies IMHO. Also helpful to see what's happening while we're loading the firwmare and how much time it takes.

---
 drivers/gpu/drm/i915/intel_csr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_csr.c +0 -0
index aae0652..2cf25ee 100644
@@ -389,6 +389,7 @@ static void finish_csr_load(const struct firmware *fw, void *context)
 	intel_csr_load_program(dev);
 	fw_loaded = true;
 
Quoted 3 lines

drivers/gpu/drm/i915/intel_csr.c static void finish_csr_load(const struct firmware *fw, void *context) · line 392

Quoted 1 line
drivers/gpu/drm/i915/intel_csr.c +1 -0
+	DRM_DEBUG_KMS("Finished loading %s\n", dev_priv->csr.fw_path);

KMS? DRM_DEBUG_DRIVER() as it is off wider scope.

Quoted 5 lines

Is it? AFAIK the DMC is all about saving/restoring display registers when we toggle the power wells between frame updates for eDP + PSR panels.

But then I guess the loading itself is a generic driver function.

Well I merged both patches. Someone still owes me the conversion to refcount away from the hand-rolled completion though ;-) -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] drm/i915/skl: Add debug messages at the start/end of DMC firmware loading

In reply to Damien Lespiau

Task id: 6537 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied

PNV                                  270/270              270/270
ILK                                  303/303              303/303
SNB                                  312/312              312/312
IVB                                  343/343              343/343
BYT                                  287/287              287/287
BDW                                  318/318              318/318

-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx