From: Andrew Morton <akpm@linux-foundation.org>
To: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Joseph Chan <JosephChan@via.com.tw>,
Jonathan Corbet <corbet@lwn.net>
Subject: Re: [RFC] viafb: add interface for output device configuration
Date: Tue, 07 Sep 2010 22:53:01 +0000 [thread overview]
Message-ID: <20100907155301.d97c85c7.akpm@linux-foundation.org> (raw)
In-Reply-To: <1283813290-3384-1-git-send-email-FlorianSchandinat@gmx.de>
On Mon, 6 Sep 2010 22:48:10 +0000
Florian Tobias Schandinat <FlorianSchandinat@gmx.de> wrote:
> viafb: add interface for output device configuration
>
> This patch extends the proc entry to contain a possibility to view and
> change the output devices for each IGA. This is useful for debugging
> output problems as it provides a reliable way to query which low level
> devices are active after VIAs output device configuration nightmare
> happended. It's as well suitable for daily use as one can change the
> output configuration on the fly for example to connect a projector.
> At the moment it's still unstable. The reason is that we have to handle
> a bunch of undocumented output devices (those without a proper name) and
> that this patch is the first step to collect and verify the needed
> information. Basically the only configuration change that is expected to
> work at the moment is switching output devices between IGA1 and IGA2.
>
> ...
>
> +u32 via_parse_odev(char *input, char **end)
> +{
> + char *ptr = input;
> + u32 odev = 0;
> + bool next = true;
> + int i, len;
> +
> + while (next) {
> + next = false;
> + for (i = 0; i < ARRAY_SIZE(device_mapping); i++) {
> + len = strlen(device_mapping[i].name);
> + if (!strncmp(ptr, device_mapping[i].name, len)) {
> + odev |= device_mapping[i].device;
> + ptr += len;
> + if (*ptr = ',') {
> + ptr++;
> + next = true;
> + }
> + }
> + }
> + }
> +
> + *end = ptr;
> + return odev;
> +}
So people must decrypt the above code
> + iga1_entry = proc_mkdir("iga1", viafb_entry);
> + shared->iga1_proc_entry = iga1_entry;
> + proc_create("output_devices", 0, iga1_entry,
> + &viafb_iga1_odev_proc_fops);
> + iga2_entry = proc_mkdir("iga2", viafb_entry);
> + shared->iga2_proc_entry = iga2_entry;
> + proc_create("output_devices", 0, iga2_entry,
> + &viafb_iga2_odev_proc_fops);
> }
to work out what to write into these?
Can we have a wee bit of documetnation, please? At least in the
changelog, but Documentation/fb/viafb.txt would be a better place.
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Joseph Chan <JosephChan@via.com.tw>,
Jonathan Corbet <corbet@lwn.net>
Subject: Re: [RFC] viafb: add interface for output device configuration
Date: Tue, 7 Sep 2010 15:53:01 -0700 [thread overview]
Message-ID: <20100907155301.d97c85c7.akpm@linux-foundation.org> (raw)
In-Reply-To: <1283813290-3384-1-git-send-email-FlorianSchandinat@gmx.de>
On Mon, 6 Sep 2010 22:48:10 +0000
Florian Tobias Schandinat <FlorianSchandinat@gmx.de> wrote:
> viafb: add interface for output device configuration
>
> This patch extends the proc entry to contain a possibility to view and
> change the output devices for each IGA. This is useful for debugging
> output problems as it provides a reliable way to query which low level
> devices are active after VIAs output device configuration nightmare
> happended. It's as well suitable for daily use as one can change the
> output configuration on the fly for example to connect a projector.
> At the moment it's still unstable. The reason is that we have to handle
> a bunch of undocumented output devices (those without a proper name) and
> that this patch is the first step to collect and verify the needed
> information. Basically the only configuration change that is expected to
> work at the moment is switching output devices between IGA1 and IGA2.
>
> ...
>
> +u32 via_parse_odev(char *input, char **end)
> +{
> + char *ptr = input;
> + u32 odev = 0;
> + bool next = true;
> + int i, len;
> +
> + while (next) {
> + next = false;
> + for (i = 0; i < ARRAY_SIZE(device_mapping); i++) {
> + len = strlen(device_mapping[i].name);
> + if (!strncmp(ptr, device_mapping[i].name, len)) {
> + odev |= device_mapping[i].device;
> + ptr += len;
> + if (*ptr == ',') {
> + ptr++;
> + next = true;
> + }
> + }
> + }
> + }
> +
> + *end = ptr;
> + return odev;
> +}
So people must decrypt the above code
> + iga1_entry = proc_mkdir("iga1", viafb_entry);
> + shared->iga1_proc_entry = iga1_entry;
> + proc_create("output_devices", 0, iga1_entry,
> + &viafb_iga1_odev_proc_fops);
> + iga2_entry = proc_mkdir("iga2", viafb_entry);
> + shared->iga2_proc_entry = iga2_entry;
> + proc_create("output_devices", 0, iga2_entry,
> + &viafb_iga2_odev_proc_fops);
> }
to work out what to write into these?
Can we have a wee bit of documetnation, please? At least in the
changelog, but Documentation/fb/viafb.txt would be a better place.
next prev parent reply other threads:[~2010-09-07 22:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 22:48 [RFC] viafb: add interface for output device configuration Florian Tobias Schandinat
2010-09-06 22:48 ` Florian Tobias Schandinat
2010-09-07 22:53 ` Andrew Morton [this message]
2010-09-07 22:53 ` Andrew Morton
2010-09-07 23:20 ` Florian Tobias Schandinat
2010-09-07 23:20 ` Florian Tobias Schandinat
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=20100907155301.d97c85c7.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=FlorianSchandinat@gmx.de \
--cc=JosephChan@via.com.tw \
--cc=corbet@lwn.net \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.