Re: [PATCH v2] drm/i915/guc: Fixing error code for WOPCM initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Michal Wajdeczko (2019-03-06 08:41:20)
> On Wed, 06 Mar 2019 01:30:11 +0100, Sujaritha Sundaresan  
> <sujaritha.sundaresan@xxxxxxxxx> wrote:
> 
> > Replacing the -E2BIG error code return for WOPCM
> > initialization with -ENODEV. This will prevent the pci from
> 
> s/pci/CI ?
> 
> > picking this up as a warning during fault injection testing.
> >
> > v2: change the final return code in i915_pci_probe() to ENODEV
> >     instead of the specific wopcm change. - Daniele
> 
> s/wopcm/WOPCM
> 
> >
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
> > Cc: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
> > Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/i915_pci.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_pci.c  
> > b/drivers/gpu/drm/i915/i915_pci.c
> > index c42c5ccf38fe..f962b5c0b3c1 100644
> > --- a/drivers/gpu/drm/i915/i915_pci.c
> > +++ b/drivers/gpu/drm/i915/i915_pci.c
> > @@ -778,7 +778,7 @@ static int i915_pci_probe(struct pci_dev *pdev,  
> > const struct pci_device_id *ent)
> >       err = i915_driver_load(pdev, ent);
> >       if (err)
> > -             return err;
> > +             return i915_error_injected() ? -ENODEV : err;
> >       if (i915_inject_load_failure()) {
> >               i915_pci_remove(pdev);
> 
> Hmm, since this is quite big deviation from original approach, maybe
> you should sent it as new patch (with updated title and commit message)
> as now this covers all injected errors (not just E2BIG from WOPCM)

And I'm not sure we want to do that. When we do failure injection, we
pick the errno and part of the test is making sure that gets reported
unadulterated.

Now doing an if (i915_error_injected() && !err) err = -EINVAL; makes
sense to catch places where we've eaten that error and so breaking the
test.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux