linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Alexander E. Patrakov"
	<patrakov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"David Herrmann"
	<dh.herrmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Ville Syrjälä"
	<ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: Dave Airlie <airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Linux Fbdev development list
	<linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	"xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org"
	<xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org>,
	dri-devel
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: Fixing the kernels backlight API
Date: Thu, 13 Feb 2014 13:57:44 +0000	[thread overview]
Message-ID: <52FCCF58.1090406@redhat.com> (raw)
In-Reply-To: <52FC683F.10905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Hi,

On 02/13/2014 07:37 AM, Alexander E. Patrakov wrote:
> 13.02.2014 04:26, David Herrmann wrote:
>> The "attach" stuff actually sounds doable, but who decides which one
>> to attach? You still need some user-space script during device-plug
>> for that.
>> But to be honest, the simplest way would be a "backlightd"
>> bus-activatable daemon. SetBacklight() then takes a DRM-connector and
>> brightness-value, which the daemon looks up in /sys and sets.. This
>> has the advantage that we can do any fancy matching in user-space. We
>> can provide quirks (maybe even via udev-hwdb) and other helpers for
>> weird setups.
> 
> What would be done with Samsung monitors (like an old SyncMaster 770P) that have a DVI connection, no physical buttons and have to be controlled via DDC-CI? Currently, ddccontrol works (via /dev/i2c-*), but only from root. I would like this use case to be covered in such a way that it could work both in Xorg and in Wayland, and, if possible, without races related to i2c usage from the kernel and from userspace.

The nice thing about having a userspace daemon for this is that we can
actually add some support for DCC-CI too.

WRT races between user and kernelspace, those can be avoided by using
the I2C_RDWR ioctl, in this case you can specify multipel i2c writes /
reads which will all get executed as one transaction, note this
assumes that the protocol supports repeated START conditions,
if it needs a STOP condition and still needs everything to be in
one transaction, then things become trickier. This also assumes
that the i2c controller driver used supports I2C_FUNC_I2C

Regards,

Hans

  parent reply	other threads:[~2014-02-13 13:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 15:12 Fixing the kernels backlight API Hans de Goede
     [not found] ` <52FB8F45.9060006-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-12 20:14   ` Dave Airlie
     [not found]     ` <CAPM=9tyYLuoTtW69-cPx-JSuar++D5WEtYRZr_-aP7uowZpVyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-12 20:43       ` Ville Syrjälä
2014-02-12 22:26         ` David Herrmann
     [not found]           ` <CANq1E4R=UVo5YVPUrdRFeobAE-qU6e-+GHZ2VJwwaa8zEO6g3Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-13  6:37             ` Alexander E. Patrakov
     [not found]               ` <52FC683F.10905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-13 13:57                 ` Hans de Goede [this message]
2014-02-13 13:49             ` Hans de Goede
2014-02-13 13:41       ` Hans de Goede
2014-02-13 17:19         ` Matthew Garrett
     [not found]           ` <20140213171932.GB4420-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2014-02-13 19:43             ` Hans de Goede
     [not found]               ` <52FD204E.40507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-13 20:12                 ` Matthew Garrett
     [not found]                   ` <20140213201237.GA19355-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2014-02-14  8:45                     ` Hans de Goede

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=52FCCF58.1090406@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dh.herrmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=patrakov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).