Re: [PATCH igt 2/2] lib: Override the connector status using the sysfs status attribute

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

 



On Thu, May 26, 2016 at 05:39:32PM +0300, Ville Syrjälä wrote:
> On Thu, May 26, 2016 at 03:14:30PM +0100, Chris Wilson wrote:
> > There are two paths to force enable a connector, via debugfs and via
> > sysfs. sysfs has the advantage of being a stable interface and of
> > updating the connector after application (allowing us to not force a
> > reprobe from userspace).
> > 
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > ---
> >  lib/igt_kms.c | 27 +++++++++------------------
> >  1 file changed, 9 insertions(+), 18 deletions(-)
> > 
> > diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> > index 4da645a..5678248 100644
> > --- a/lib/igt_kms.c
> > +++ b/lib/igt_kms.c
> > @@ -48,6 +48,7 @@
> >  #include "igt_aux.h"
> >  #include "intel_chipset.h"
> >  #include "igt_debugfs.h"
> > +#include "igt_sysfs.h"
> >  
> >  /* list of connectors that need resetting on exit */
> >  #define MAX_CONNECTORS 32
> > @@ -596,9 +597,9 @@ bool kmstest_force_connector(int drm_fd, drmModeConnector *connector,
> >  {
> >  	char *path, **tmp;
> >  	const char *value;
> > -	int debugfs_fd, ret, len;
> >  	drmModeConnector *temp;
> >  	uint32_t devid;
> > +	int len;
> >  
> >  	devid = intel_get_drm_devid(drm_fd);
> >  
> > @@ -615,7 +616,7 @@ bool kmstest_force_connector(int drm_fd, drmModeConnector *connector,
> >  		value = "on";
> >  		break;
> >  	case FORCE_CONNECTOR_DIGITAL:
> > -		value = "digital";
> > +		value = "on-digital";
> >  		break;
> >  	case FORCE_CONNECTOR_OFF:
> >  		value = "off";
> > @@ -623,20 +624,14 @@ bool kmstest_force_connector(int drm_fd, drmModeConnector *connector,
> >  
> >  	default:
> >  	case FORCE_CONNECTOR_UNSPECIFIED:
> > -		value = "unspecified";
> > +		value = "detect";
> >  		break;
> >  	}
> >  
> > -	igt_assert_neq(asprintf(&path, "%s-%d/force", kmstest_connector_type_str(connector->connector_type), connector->connector_type_id),
> > +	igt_assert_neq(asprintf(&path, "%s-%d/status", kmstest_connector_type_str(connector->connector_type), connector->connector_type_id),
> 
> That'll need a cardN- prefix. Rather annoying.

Oh dear. That is annoying.

Be right back.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux