From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH RESEND 1/4] drm/sysfs: add a helper for extracting connector type from kobject
Date: Tue, 12 May 2015 13:44:59 +0200 [thread overview]
Message-ID: <20150512114459.GT15256@phenom.ffwll.local> (raw)
In-Reply-To: <20150512110336.GU18908@intel.com>
On Tue, May 12, 2015 at 02:03:36PM +0300, Ville Syrjälä wrote:
> On Tue, May 12, 2015 at 12:14:52PM +0300, Jani Nikula wrote:
> > This reduces duplication in the patches to follow. No functional
> > changes.
> >
> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> The series looks reasonable.
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Series merged to topic/drm-misc, thanks.
-Daniel
>
> > ---
> > drivers/gpu/drm/drm_sysfs.c | 12 +++++++++---
> > 1 file changed, 9 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
> > index ffc305fc2076..33466999b59a 100644
> > --- a/drivers/gpu/drm/drm_sysfs.c
> > +++ b/drivers/gpu/drm/drm_sysfs.c
> > @@ -407,17 +407,23 @@ static struct attribute *connector_opt_dev_attrs[] = {
> > NULL
> > };
> >
> > -static umode_t connector_opt_dev_is_visible(struct kobject *kobj,
> > - struct attribute *attr, int idx)
> > +/* Connector type related helpers */
> > +static int kobj_connector_type(struct kobject *kobj)
> > {
> > struct device *dev = kobj_to_dev(kobj);
> > struct drm_connector *connector = to_drm_connector(dev);
> >
> > + return connector->connector_type;
> > +}
> > +
> > +static umode_t connector_opt_dev_is_visible(struct kobject *kobj,
> > + struct attribute *attr, int idx)
> > +{
> > /*
> > * In the long run it maybe a good idea to make one set of
> > * optionals per connector type.
> > */
> > - switch (connector->connector_type) {
> > + switch (kobj_connector_type(kobj)) {
> > case DRM_MODE_CONNECTOR_DVII:
> > case DRM_MODE_CONNECTOR_Composite:
> > case DRM_MODE_CONNECTOR_SVIDEO:
> > --
> > 2.1.4
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> --
> Ville Syrjälä
> Intel OTC
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2015-05-12 11:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 9:14 [PATCH RESEND 1/4] drm/sysfs: add a helper for extracting connector type from kobject Jani Nikula
2015-05-12 9:14 ` [PATCH RESEND 2/4] drm/sysfs: make optional attribute groups per connector type Jani Nikula
2015-05-12 9:14 ` [PATCH RESEND 3/4] drm/sysfs: split DVI-I and TV-out attributes Jani Nikula
2015-05-12 9:14 ` [PATCH RESEND 4/4] drm/sysfs: remove unnecessary connector type checks Jani Nikula
2015-05-15 10:22 ` shuang.he
2015-05-12 11:03 ` [PATCH RESEND 1/4] drm/sysfs: add a helper for extracting connector type from kobject Ville Syrjälä
2015-05-12 11:44 ` Daniel Vetter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150512114459.GT15256@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox