drm/i915: Remove unnecessary () used with WARN()
Subsystems (2)
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
@@ -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
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
@@ -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
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.
Signed-off-by Damien Lespiau <[email protected]>--- drivers/gpu/drm/i915/intel_csr.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/i915/intel_csr.c +0
-0
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
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.
Signed-off-by Damien Lespiau <[email protected]>--- drivers/gpu/drm/i915/intel_csr.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/i915/intel_csr.c +0
-0@@ -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
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.
Signed-off-by Damien Lespiau <[email protected]>--- drivers/gpu/drm/i915/intel_csr.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/i915/intel_csr.c +0
-0@@ -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
Re: [PATCH 2/2] drm/i915/skl: Add debug messages at the start/end of DMC firmware loading
In reply to Damien LespiauTask 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