Bug 35149 - modes unassigned to outputs not shown distinctly
Summary: modes unassigned to outputs not shown distinctly
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xrandr (show other bugs)
Version: git
Hardware: Other All
: low trivial
Assignee: Keith Packard
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-03-09 06:02 UTC by chrysn
Modified: 2018-08-10 20:33 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
a simple patch for the bug (613 bytes, patch)
2011-10-09 15:25 UTC, chrysn
no flags Details | Splinter Review
code refactoring (3.33 KB, patch)
2011-10-09 15:50 UTC, chrysn
no flags Details | Splinter Review
a simple patch for the bug (875 bytes, patch)
2012-07-09 14:54 UTC, chrysn
no flags Details | Splinter Review
code refactoring (3.32 KB, patch)
2012-07-09 14:55 UTC, chrysn
no flags Details | Splinter Review
a simple patch for the bug (869 bytes, patch)
2014-12-24 00:30 UTC, chrysn
no flags Details | Splinter Review
code refactoring (3.30 KB, patch)
2014-12-24 00:31 UTC, chrysn
no flags Details | Splinter Review

Description chrysn 2011-03-09 06:02:34 UTC
in verbose mode, there is no way to tell modes that are not assigned to any output apart from modes that are assigned to the last output.

i suggest that `if (res->nmode > 0)` around xrandr.c:3221 (line numbers as of git d58d70f6), a message like "Not assigned to any output:\n" should be printed.

(due to what i guess is a bug, it *is* currently possible to tell them apart under some circumstances -- the code blocks xrandr:3161-3184 and 3221:3237 are identical but for "current"/"preferred" messages (which don't apply to unassigned modes) and the [+-][HV]Sync flags which i assume were just forgotten to add to the unassigned outputs)

the distinction between unassigned modes and modes assigned to the last output can also be made in non-verbose mode, where the unassigned modes are shown in a more detailled way (as in verbose); nevertheless, the same message should also be shown there to avoid confusion.

while the overall severity of this is rather low, this is a severe program for tools that parse xrandr output (which is, i have to admit, not what xrandr is designed for).
Comment 1 Jeremy Huddleston Sequoia 2011-10-08 19:36:34 UTC
Line numbers change.  Patches are better since it makes it more clear what 
you're talking about.
Comment 2 chrysn 2011-10-09 15:25:30 UTC
Created attachment 52158 [details] [review]
a simple patch for the bug
Comment 3 chrysn 2011-10-09 15:50:11 UTC
Created attachment 52159 [details] [review]
code refactoring

i'm not sure if it follows the coding conventions completely (especially, i'm confused about whitespace handling), but it appears to be functional (flags show up now in unassigned outputs).
Comment 4 chrysn 2012-07-09 14:54:34 UTC
Created attachment 64026 [details] [review]
a simple patch for the bug

enhanced version of the patch; the old one was erroneous in that it showed the message unconditionally. also rebased onto current master.
Comment 5 chrysn 2012-07-09 14:55:44 UTC
Created attachment 64027 [details] [review]
code refactoring

rebased onto new "simple patch for the bug"
Comment 6 chrysn 2012-07-09 15:00:47 UTC
unless there are good reasons against it, please only apply the two patches together, as i can thus use the missing flags to tell the assigned from the unassigned modes in older versions.
Comment 7 chrysn 2014-12-24 00:30:33 UTC
Created attachment 111248 [details] [review]
a simple patch for the bug
Comment 8 chrysn 2014-12-24 00:31:33 UTC
Created attachment 111249 [details] [review]
code refactoring

those two new patches are the last versions rebased onto current master.
Comment 9 GitLab Migration User 2018-08-10 20:33:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/xrandr/issues/11.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.