diff mbox series

drm/i915: Do not print 'pxp init failed with 0' when it succeed

Message ID 20240320210547.71937-1-jose.souza@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Do not print 'pxp init failed with 0' when it succeed | expand

Commit Message

Souza, Jose March 20, 2024, 9:05 p.m. UTC
It is misleading, if the intention was to also print something
in case it succeed it should have a different string.

Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/i915_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jani Nikula March 21, 2024, 12:38 p.m. UTC | #1
On Wed, 20 Mar 2024, José Roberto de Souza <jose.souza@intel.com> wrote:
> It is misleading, if the intention was to also print something
> in case it succeed it should have a different string.
>
> Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>

Fixes: 698e19da2914 ("drm/i915: Skip pxp init if gt is wedged")
Cc: <stable@vger.kernel.org> # v6.8+
Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_driver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 9ee902d5b72c4..4b9233c07a22c 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -800,7 +800,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  		goto out_cleanup_modeset2;
>  
>  	ret = intel_pxp_init(i915);
> -	if (ret != -ENODEV)
> +	if (ret && ret != -ENODEV)
>  		drm_dbg(&i915->drm, "pxp init failed with %d\n", ret);
>  
>  	ret = intel_display_driver_probe(i915);
Souza, Jose March 21, 2024, 2:27 p.m. UTC | #2
On Thu, 2024-03-21 at 14:38 +0200, Jani Nikula wrote:
> On Wed, 20 Mar 2024, José Roberto de Souza <jose.souza@intel.com> wrote:
> > It is misleading, if the intention was to also print something
> > in case it succeed it should have a different string.
> > 
> > Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> 
> Fixes: 698e19da2914 ("drm/i915: Skip pxp init if gt is wedged")
> Cc: <stable@vger.kernel.org> # v6.8+
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

thank you, pushed.

> 
> > ---
> >  drivers/gpu/drm/i915/i915_driver.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> > index 9ee902d5b72c4..4b9233c07a22c 100644
> > --- a/drivers/gpu/drm/i915/i915_driver.c
> > +++ b/drivers/gpu/drm/i915/i915_driver.c
> > @@ -800,7 +800,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> >  		goto out_cleanup_modeset2;
> >  
> >  	ret = intel_pxp_init(i915);
> > -	if (ret != -ENODEV)
> > +	if (ret && ret != -ENODEV)
> >  		drm_dbg(&i915->drm, "pxp init failed with %d\n", ret);
> >  
> >  	ret = intel_display_driver_probe(i915);
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 9ee902d5b72c4..4b9233c07a22c 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -800,7 +800,7 @@  int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		goto out_cleanup_modeset2;
 
 	ret = intel_pxp_init(i915);
-	if (ret != -ENODEV)
+	if (ret && ret != -ENODEV)
 		drm_dbg(&i915->drm, "pxp init failed with %d\n", ret);
 
 	ret = intel_display_driver_probe(i915);