[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #26 from poma pomidorabelis...@gmail.com --- (In reply to andrew p. from comment #25) (In reply to Ilia Mirkin from comment #24) It's good that it does that. Is it so good that newest nouveau version will resolve this bug? About xtrace, for poma: Guys, if any of you know how to x[11]trace lightdm-gtk-greeter? You need to modify greeter-wrapper script to run xtrace. Default path for ubuntu: /usr/lib/lightdm/lightdm-greeter-session Replace launching command: exec $@ with xtrace command: exec xtrace -b -o /tmp/xtrace.log $@ $ rpm -ql lightdm-gtk | grep -v 'locale\|icons\|doc' /etc/lightdm/lightdm-gtk-greeter.conf /usr/sbin/lightdm-gtk-greeter /usr/share/xgreeters/lightdm-greeter.desktop /usr/share/xgreeters/lightdm-gtk-greeter.desktop -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #28 from andrew p. pan.pav@gmail.com --- (In reply to poma from comment #27) Here, that's all, no wrapper. lightdm-gtk-greeter.desktop must be ok: Exec=xtrace -b -o /tmp/xtrace.log lightdm-gtk-greeter -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #27 from poma pomidorabelis...@gmail.com --- (In reply to poma from comment #26) (In reply to andrew p. from comment #25) (In reply to Ilia Mirkin from comment #24) It's good that it does that. Is it so good that newest nouveau version will resolve this bug? About xtrace, for poma: Guys, if any of you know how to x[11]trace lightdm-gtk-greeter? You need to modify greeter-wrapper script to run xtrace. Default path for ubuntu: /usr/lib/lightdm/lightdm-greeter-session Replace launching command: exec $@ with xtrace command: exec xtrace -b -o /tmp/xtrace.log $@ $ rpm -ql lightdm-gtk | grep -v 'locale\|icons\|doc' /etc/lightdm/lightdm-gtk-greeter.conf /usr/sbin/lightdm-gtk-greeter /usr/share/xgreeters/lightdm-greeter.desktop /usr/share/xgreeters/lightdm-gtk-greeter.desktop $ file /usr/share/xgreeters/lightdm-greeter.desktop /usr/share/xgreeters/lightdm-greeter.desktop: symbolic link to `/etc/alternatives/lightdm-greeter' $ file /etc/alternatives/lightdm-greeter /etc/alternatives/lightdm-greeter: symbolic link to `/usr/share/xgreeters/lightdm-gtk-greeter.desktop' $ cat /usr/share/xgreeters/lightdm-gtk-greeter.desktop [Desktop Entry] Name=LightDM GTK+ Greeter Comment=This runs the GTK+ greeter, it should only be run from LightDM Exec=lightdm-gtk-greeter Type=Application X-Ubuntu-Gettext-Domain=lightdm Here, that's all, no wrapper. -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #25 from andrew p. pan.pav@gmail.com --- (In reply to Ilia Mirkin from comment #24) It's good that it does that. Is it so good that newest nouveau version will resolve this bug? About xtrace, for poma: Guys, if any of you know how to x[11]trace lightdm-gtk-greeter? You need to modify greeter-wrapper script to run xtrace. Default path for ubuntu: /usr/lib/lightdm/lightdm-greeter-session Replace launching command: exec $@ with xtrace command: exec xtrace -b -o /tmp/xtrace.log $@ -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #29 from poma pomidorabelis...@gmail.com --- (In reply to andrew p. from comment #28) (In reply to poma from comment #27) Here, that's all, no wrapper. lightdm-gtk-greeter.desktop must be ok: Exec=xtrace -b -o /tmp/xtrace.log lightdm-gtk-greeter # cat /usr/share/xgreeters/lightdm-gtk-greeter.desktop.old [Desktop Entry] Name=LightDM GTK+ Greeter Comment=This runs the GTK+ greeter, it should only be run from LightDM Exec=xtrace -b -o /tmp/xtrace.log lightdm-gtk-greeter Type=Application X-Ubuntu-Gettext-Domain=lightdm # cat /var/log/lightdm/lightdm.log.old ... [+0.53s] DEBUG: Seat seat0: Display server ready, starting session authentication [+0.53s] DEBUG: Session pid=13245: Started with service 'lightdm-greeter', username 'lightdm' [+0.57s] DEBUG: Session pid=13245: Authentication complete with return value 0: Success [+0.57s] DEBUG: Seat seat0: Session authenticated, running command [+0.57s] DEBUG: Session pid=13245: Running command /usr/bin/xtrace -b -o /tmp/xtrace.log lightdm-gtk-greeter [+0.57s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm [+0.57s] DEBUG: Session pid=13245: Logging to /var/log/lightdm/x-0-greeter.log [+0.61s] DEBUG: Activating VT 1 [+0.61s] DEBUG: Activating login1 session c52 [+0.61s] DEBUG: Seat seat0 changes active session to c52 [+0.61s] DEBUG: Session c52 is already active [+0.61s] DEBUG: Session pid=13245: Greeter closed communication channel [+0.62s] DEBUG: Session pid=13245: Exited with return value 0 [+0.62s] DEBUG: Seat seat0: Session stopped [+0.62s] DEBUG: Seat seat0: Stopping; failed to start a greeter [+0.62s] DEBUG: Seat seat0: Stopping [+0.62s] DEBUG: Seat seat0: Stopping display server [+0.62s] DEBUG: Sending signal 15 to process 13235 [+0.62s] DEBUG: Seat seat0 changes active session to [+0.62s] CRITICAL: session_get_login1_session_id: assertion 'session != NULL' failed [+0.87s] DEBUG: Process 13235 exited with return value 0 [+0.87s] DEBUG: DisplayServer x-0: X server stopped [+0.87s] DEBUG: Releasing VT 1 [+0.87s] DEBUG: DisplayServer x-0: Removing X server authority /var/run/lightdm/root/:0 [+0.87s] DEBUG: Seat seat0: Display server stopped [+0.87s] DEBUG: Seat seat0: Stopped [+0.87s] DEBUG: Required seat has stopped [+0.87s] DEBUG: Stopping display manager [+0.87s] DEBUG: Display manager stopped [+0.87s] DEBUG: Stopping daemon [+0.87s] DEBUG: Exiting with return value 1 # cat /var/log/lightdm/x-0-greeter.log.old executable `-b' not found Try `xtrace --help' or `xtrace --usage' for more information. # xtrace --help Usage: xtrace [OPTION]... PROGRAM [PROGRAMOPTION]... Trace execution of program by printing currently executed function. --data=FILE Don't run the program, just print the data from FILE. -?,--help Print this help and exit --usage Give a short usage message -V,--version Print version information and exit Mandatory arguments to long options are also mandatory for any corresponding short options. For bug reporting instructions, please see: http://www.gnu.org/software/libc/bugs.html. # xtrace --version xtrace (GNU libc) 2.20 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Ulrich Drepper. -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #30 from poma pomidorabelis...@gmail.com --- # which xtrace /bin/xtrace # rpm -qf /bin/xtrace glibc-utils-2.20-8.fc21.x86_64 # yum -q search xtrace = N/S matched: xtrace == xtrace.x86_64 : A program for X11 protocol tracing # yum -q install xtrace Package ArchVersion Repository Size Installing: xtrace x86_64 1.3.1-7.fc21 fedora 102 k Transaction Summary Install 1 Package Is this ok [y/d/N]: y Transaction check error: file /usr/bin/xtrace from install of xtrace-1.3.1-7.fc21.x86_64 conflicts with file from package glibc-utils-2.20-8.fc21.x86_64 Error Summary - # yumdownloader -q xtrace # rpm -ivh xtrace-1.3.1-7.fc21.x86_64.rpm Preparing... # [100%] file /usr/bin/xtrace from install of xtrace-1.3.1-7.fc21.x86_64 conflicts with file from package glibc-utils-2.20-8.fc21.x86_64 # rpm -ivh xtrace-1.3.1-7.fc21.x86_64.rpm --force Preparing... # [100%] Updating / installing... 1:xtrace-1.3.1-7.fc21 # [100%] # rpm -qf /bin/xtrace xtrace-1.3.1-7.fc21.x86_64 # xtrace --help xtrace: Dump all X protocol data being tunneled from a fake X display to a real one. usage: xtrace [options] [[--] command args ...] --display, -d display to connect to --fakedisplay, -D display to fake --copyauthentication, -cCopy credentials --nocopyauthentication, -nDo not copy credentials --authfile, -f file instead of ~/.Xauthority to get credentials from --newauthfile, -F file instead of ~/.Xauthority to put credentials in --waitforclient, -Wwait for connection even if command terminates --stopwhendone, -sReturn when last client disconnects --keeprunning, -kKeep running --denyextensions, -eFake unavailability of all extensions --readwritedebug, -wPrint amounts of data read/sent --maxlistlength, -m maximum number of entries in each list shown --outfile, -o filenameOutput to file instead of stdout --buffered, -bDo not output every line but only when buffer is full # xtrace --version xtrace version 1.3.1 -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #31 from poma pomidorabelis...@gmail.com --- Review Request: xtrace - Utility for tracing X11 protocol for debugging https://bugzilla.redhat.com/show_bug.cgi?id=1067665#c18 -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH v2 8/9] acpi: Add support for Apple Gmux _DMS
On 28 May 2015 at 16:40, Pierre Moreau pierre.mor...@free.fr wrote: Changes since v1: * Factorise testing of the 3 different _DSMs presence with a single function Not overly important, but this part could be split out into an earlier commit, keeping this commit just for adding the gmux support? * Check for gmux in nouveau_switcheroo_set_state * Change some comments and messages that were referring explicitly to Optimus whereas they were also testing the mux and gmux _DSMs As could this part. Thanks, Ben. Signed-off-by: Pierre Moreau pierre.mor...@free.fr --- drm/nouveau/nouveau_acpi.c | 57 -- drm/nouveau/nouveau_acpi.h | 4 drm/nouveau/nouveau_drm.c | 12 +- drm/nouveau/nouveau_vga.c | 10 4 files changed, 70 insertions(+), 13 deletions(-) diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c index edc4b94..ee5fcfa 100644 --- a/drm/nouveau/nouveau_acpi.c +++ b/drm/nouveau/nouveau_acpi.c @@ -29,6 +29,10 @@ #define NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN (NOUVEAU_DSM_OPTIMUS_POWERDOWN_PS3 | NOUVEAU_DSM_OPTIMUS_FLAGS_CHANGED) +#define NOUVEAU_DSM_GMUX_V1_CAPS (3 6) + +#define NOUVEAU_DSM_GMUX_V2_CAPS (1 1) + /* result of the optimus caps function */ #define OPTIMUS_ENABLED (1 0) #define OPTIMUS_STATUS_MASK (3 3) @@ -45,6 +49,7 @@ static struct nouveau_dsm_priv { bool mux_detected; bool optimus_detected; + bool gmux_detected; acpi_handle dhandle; acpi_handle rom_handle; } nouveau_dsm_priv; @@ -57,8 +62,17 @@ bool nouveau_has_mux(void) { return nouveau_dsm_priv.mux_detected; } +bool nouveau_has_gmux(void) { + return nouveau_dsm_priv.gmux_detected; +} + +bool nouveau_has_dsm(void) { + return nouveau_is_optimus() || nouveau_has_mux() || nouveau_has_gmux(); +} + #define NOUVEAU_DSM_HAS_MUX 0x1 #define NOUVEAU_DSM_HAS_OPT 0x2 +#define NOUVEAU_DSM_HAS_GMUX 0x4 #ifdef CONFIG_VGA_SWITCHEROO static const uint32_t nouveau_mux_dsm_rid = 0x0102; @@ -73,6 +87,18 @@ static const char nouveau_op_dsm_muid[] = { 0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0, }; +static const uint32_t nouveau_gmux_v1_dsm_rid = 0x101; +static const char nouveau_gmux_v1_dsm_muid[] = { + 0xA6, 0x69, 0x86, 0x99, 0xE9, 0x8B, 0xFB, 0x49, + 0xBD, 0xDB, 0x51, 0xA1, 0xEF, 0xE1, 0x9C, 0x3D, +}; + +static const uint32_t nouveau_gmux_v2_dsm_rid = 0x001; +static const char nouveau_gmux_v2_dsm_muid[] = { + 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, + 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B, +}; + static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result) { int i; @@ -161,6 +187,17 @@ static int nouveau_evaluate_mux_dsm(acpi_handle handle, int func, int arg) return ret; } +static int nouveau_check_gmux_dsm(acpi_handle handle) +{ + bool has_v1 = acpi_check_dsm(handle, nouveau_gmux_v1_dsm_muid, +nouveau_gmux_v1_dsm_rid, +NOUVEAU_DSM_GMUX_V1_CAPS); + bool has_v2 = acpi_check_dsm(handle, nouveau_gmux_v2_dsm_muid, +nouveau_gmux_v2_dsm_rid, +NOUVEAU_DSM_GMUX_V2_CAPS); + return has_v1 || has_v2; +} + static int nouveau_dsm_switch_mux(acpi_handle handle, int mux_id) { mxm_wmi_call_mxmx(mux_id == NOUVEAU_DSM_MUX_LED_STAMINA ? MXM_MXDS_ADAPTER_IGD : MXM_MXDS_ADAPTER_0); @@ -238,6 +275,9 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev) 1 NOUVEAU_DSM_MUX_POWER)) retval |= NOUVEAU_DSM_HAS_MUX; + if (nouveau_check_gmux_dsm(dhandle)) + retval |= NOUVEAU_DSM_HAS_GMUX; + if (nouveau_check_optimus_dsm(dhandle)) retval |= NOUVEAU_DSM_HAS_OPT; @@ -263,6 +303,7 @@ static bool nouveau_dsm_detect(void) struct pci_dev *pdev = NULL; int has_mux = 0; int has_optimus = 0; + bool has_gmux = false; int vga_count = 0; bool guid_valid; int retval; @@ -283,6 +324,8 @@ static bool nouveau_dsm_detect(void) has_mux |= 1; if (retval NOUVEAU_DSM_HAS_OPT) has_optimus = 1; + if (retval NOUVEAU_DSM_HAS_GMUX) + has_gmux = true; } while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_3D 8, pdev)) != NULL) { @@ -293,9 +336,11 @@ static bool nouveau_dsm_detect(void) has_mux |= 1; if (retval NOUVEAU_DSM_HAS_OPT) has_optimus = 1; + if (retval NOUVEAU_DSM_HAS_GMUX) + has_gmux = true; } - /* find the optimus DSM or the mux DSM */ + /* find the optimus
Re: [Nouveau] [PATCH v2 6/9] acpi: Check returned object type by Optimus _DSM locally
On 28 May 2015 at 16:40, Pierre Moreau pierre.mor...@free.fr wrote: Most _DSM will return an integer value of 0x8002 when given an unknown UUID, revision ID or function ID. Checking locally allows us to differentiate that case from other ACPI errors, and to not report a failed to evaluate _DSM if 0x8002 is returned which was confusing. Changes since v1: * Replace ACPI errors with standard kernel ones Signed-off-by: Pierre Moreau pierre.mor...@free.fr Reviewed-by: Dave Airlie airl...@redhat.com Dave. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #33 from poma pomidorabelis...@gmail.com --- # cat /usr/share/xgreeters/lightdm-gtk-greeter.desktop.old [Desktop Entry] Name=LightDM GTK+ Greeter Comment=This runs the GTK+ greeter, it should only be run from LightDM Exec=x11trace -b -o /tmp/xtrace.log lightdm-gtk-greeter Type=Application X-Ubuntu-Gettext-Domain=lightdm # file /tmp/xtrace.log /tmp/xtrace.log: empty # cat /var/log/lightdm/lightdm.log.old ... [+0.57s] DEBUG: Seat seat0: Display server ready, starting session authentication [+0.57s] DEBUG: Session pid=3421: Started with service 'lightdm-greeter', username 'lightdm' [+0.61s] DEBUG: Session pid=3421: Authentication complete with return value 0: Success [+0.61s] DEBUG: Seat seat0: Session authenticated, running command [+0.61s] DEBUG: Session pid=3421: Running command /usr/bin/x11trace -b -o /tmp/xtrace.log lightdm-gtk-greeter [+0.61s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm [+0.61s] DEBUG: Session pid=3421: Logging to /var/log/lightdm/x-0-greeter.log [+0.69s] DEBUG: Activating VT 1 [+0.69s] DEBUG: Activating login1 session c6 [+0.69s] DEBUG: Seat seat0 changes active session to c6 [+0.69s] DEBUG: Session c6 is already active [+0.70s] DEBUG: Session pid=3421: Greeter closed communication channel [+0.71s] DEBUG: Session pid=3421: Exited with return value 0 [+0.71s] DEBUG: Seat seat0: Session stopped [+0.71s] DEBUG: Seat seat0: Stopping; failed to start a greeter [+0.71s] DEBUG: Seat seat0: Stopping [+0.71s] DEBUG: Seat seat0: Stopping display server [+0.71s] DEBUG: Sending signal 15 to process 3405 [+0.71s] DEBUG: Seat seat0 changes active session to [+0.71s] CRITICAL: session_get_login1_session_id: assertion 'session != NULL' failed [+1.00s] DEBUG: Process 3405 exited with return value 0 [+1.00s] DEBUG: DisplayServer x-0: X server stopped [+1.00s] DEBUG: Releasing VT 1 [+1.00s] DEBUG: DisplayServer x-0: Removing X server authority /var/run/lightdm/root/:0 [+1.00s] DEBUG: Seat seat0: Display server stopped [+1.00s] DEBUG: Seat seat0: Stopped [+1.00s] DEBUG: Required seat has stopped [+1.00s] DEBUG: Stopping display manager [+1.00s] DEBUG: Display manager stopped [+1.00s] DEBUG: Stopping daemon [+1.00s] DEBUG: Exiting with return value 1 # cat /var/log/lightdm/x-0-greeter.log.old No display name to create specified, trying :9 Error binding socket for ':9': 98=Address already in use -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH v2 8/9] acpi: Add support for Apple Gmux _DMS
On 28 May 2015 at 18:52, Pierre Moreau pierre.mor...@free.fr wrote: Hi Dave, - Mail original - Changes since v1: [...] diff --git a/drm/nouveau/nouveau_vga.c b/drm/nouveau/nouveau_vga.c index 9a6328f..7b13804 100644 --- a/drm/nouveau/nouveau_vga.c +++ b/drm/nouveau/nouveau_vga.c @@ -36,7 +36,7 @@ nouveau_switcheroo_set_state(struct pci_dev *pdev, { struct drm_device *dev = pci_get_drvdata(pdev); - if ((nouveau_is_optimus() || nouveau_has_mux()) state == VGA_SWITCHEROO_OFF) If I understand it correctly, if the laptop is an Optimus one or has a mux, we are not allowed to opt-out of DynPwr/DynOff by powering down the card? In the same commit adding this conditional (5addcf0a5f0fadceba6bd562d0616a1c5d4c1a4d), you added the possibility to enable/disable dynpm. How is it supposed to work, by simply echo'ing ON or OFF to vga_switcheroo/switch? Then I probably forgot some stuff as it doesn't want to work on my laptop. I can't remember to be honest I think I wanted to stop the user from changing the state if it was dynamic, now if you turn off dynpm then you should probably enable that. Dave. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #32 from poma pomidorabelis...@gmail.com --- (In reply to poma from comment #31) Review Request: xtrace - Utility for tracing X11 protocol for debugging https://bugzilla.redhat.com/show_bug.cgi?id=1067665#c18 # yum -q erase xtrace Package ArchVersion Repository Size Removing: xtrace x86_64 1.3.1-7.fc21 installed 297 k Transaction Summary Remove 1 Package Is this ok [y/N]: y Warning: RPMDB altered outside of yum. # yum -q reinstall glibc-utils Package Arch Version Repository Size Reinstalling: glibc-utils x86_64 2.20-8.fc21 updates 28 k Transaction Summary Reinstall 1 Package Is this ok [y/d/N]: y # yum -q search x11trace N/S matched: x11trace = x11trace.x86_64 : A program for X11 protocol tracing Name and summary matches only, use search all for everything. # yum -q install x11trace Package x11trace-1.3.1-8.fc21.x86_64 already installed and latest version Madre mia -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #35 from poma pomidorabelis...@gmail.com --- Created attachment 116137 -- https://bugs.freedesktop.org/attachment.cgi?id=116137action=edit x11trace.log x11trace -D :11 -d :0 -b -o /var/log/lightdm/x11trace.log /sbin/lightdm-gtk-greeter -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #34 from poma pomidorabelis...@gmail.com --- Created attachment 116136 -- https://bugs.freedesktop.org/attachment.cgi?id=116136action=edit lightdm and greeter log /usr/share/xgreeters/lightdm-gtk-greeter.desktop [Desktop Entry] Name=LightDM GTK+ Greeter Comment=This runs the GTK+ greeter, it should only be run from LightDM Exec=x11trace -D :11 -d :0 -b -o /var/log/lightdm/x11trace.log /sbin/lightdm-gtk-greeter Type=Application -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 poma pomidorabelis...@gmail.com changed: What|Removed |Added Attachment #116137|text/plain |application/octet-stream mime type|| -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH NEW 5/9] acpi: Use a single type of errors in evaluate functions
I wasn't sure how to insert this one into the flow, if I should make it a patch 4.5 or not. I went with patch 5, so all the following patches are incremented by 1 compared to the v1, sorry about that. What should be the way to go? Pierre On 28 May 2015, at 08:40, Pierre Moreau pierre.mor...@free.fr wrote: Signed-off-by: Pierre Moreau pierre.mor...@free.fr --- drm/nouveau/nouveau_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c index 01dbf1d..b837ab1 100644 --- a/drm/nouveau/nouveau_acpi.c +++ b/drm/nouveau/nouveau_acpi.c @@ -92,7 +92,7 @@ static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, u func, argv4, ACPI_TYPE_BUFFER); if (!obj) { acpi_handle_info(handle, failed to evaluate _DSM\n); -return AE_ERROR; +return -EINVAL; } else { if (result obj-buffer.length == 4) { *result = obj-buffer.pointer[0]; @@ -142,7 +142,7 @@ static int nouveau_evaluate_mux_dsm(acpi_handle handle, int func, int arg) func, argv4, ACPI_TYPE_INTEGER); if (!obj) { acpi_handle_info(handle, failed to evaluate _DSM\n); -return AE_ERROR; +return -EINVAL; } else { if (obj-integer.value == 0x8002) ret = -ENODEV; -- 2.4.2 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH v2 8/9] acpi: Add support for Apple Gmux _DMS
Changes since v1: * Factorise testing of the 3 different _DSMs presence with a single function * Check for gmux in nouveau_switcheroo_set_state * Change some comments and messages that were referring explicitly to Optimus whereas they were also testing the mux and gmux _DSMs Signed-off-by: Pierre Moreau pierre.mor...@free.fr --- drm/nouveau/nouveau_acpi.c | 57 -- drm/nouveau/nouveau_acpi.h | 4 drm/nouveau/nouveau_drm.c | 12 +- drm/nouveau/nouveau_vga.c | 10 4 files changed, 70 insertions(+), 13 deletions(-) diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c index edc4b94..ee5fcfa 100644 --- a/drm/nouveau/nouveau_acpi.c +++ b/drm/nouveau/nouveau_acpi.c @@ -29,6 +29,10 @@ #define NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN (NOUVEAU_DSM_OPTIMUS_POWERDOWN_PS3 | NOUVEAU_DSM_OPTIMUS_FLAGS_CHANGED) +#define NOUVEAU_DSM_GMUX_V1_CAPS (3 6) + +#define NOUVEAU_DSM_GMUX_V2_CAPS (1 1) + /* result of the optimus caps function */ #define OPTIMUS_ENABLED (1 0) #define OPTIMUS_STATUS_MASK (3 3) @@ -45,6 +49,7 @@ static struct nouveau_dsm_priv { bool mux_detected; bool optimus_detected; + bool gmux_detected; acpi_handle dhandle; acpi_handle rom_handle; } nouveau_dsm_priv; @@ -57,8 +62,17 @@ bool nouveau_has_mux(void) { return nouveau_dsm_priv.mux_detected; } +bool nouveau_has_gmux(void) { + return nouveau_dsm_priv.gmux_detected; +} + +bool nouveau_has_dsm(void) { + return nouveau_is_optimus() || nouveau_has_mux() || nouveau_has_gmux(); +} + #define NOUVEAU_DSM_HAS_MUX 0x1 #define NOUVEAU_DSM_HAS_OPT 0x2 +#define NOUVEAU_DSM_HAS_GMUX 0x4 #ifdef CONFIG_VGA_SWITCHEROO static const uint32_t nouveau_mux_dsm_rid = 0x0102; @@ -73,6 +87,18 @@ static const char nouveau_op_dsm_muid[] = { 0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0, }; +static const uint32_t nouveau_gmux_v1_dsm_rid = 0x101; +static const char nouveau_gmux_v1_dsm_muid[] = { + 0xA6, 0x69, 0x86, 0x99, 0xE9, 0x8B, 0xFB, 0x49, + 0xBD, 0xDB, 0x51, 0xA1, 0xEF, 0xE1, 0x9C, 0x3D, +}; + +static const uint32_t nouveau_gmux_v2_dsm_rid = 0x001; +static const char nouveau_gmux_v2_dsm_muid[] = { + 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, + 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B, +}; + static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result) { int i; @@ -161,6 +187,17 @@ static int nouveau_evaluate_mux_dsm(acpi_handle handle, int func, int arg) return ret; } +static int nouveau_check_gmux_dsm(acpi_handle handle) +{ + bool has_v1 = acpi_check_dsm(handle, nouveau_gmux_v1_dsm_muid, +nouveau_gmux_v1_dsm_rid, +NOUVEAU_DSM_GMUX_V1_CAPS); + bool has_v2 = acpi_check_dsm(handle, nouveau_gmux_v2_dsm_muid, +nouveau_gmux_v2_dsm_rid, +NOUVEAU_DSM_GMUX_V2_CAPS); + return has_v1 || has_v2; +} + static int nouveau_dsm_switch_mux(acpi_handle handle, int mux_id) { mxm_wmi_call_mxmx(mux_id == NOUVEAU_DSM_MUX_LED_STAMINA ? MXM_MXDS_ADAPTER_IGD : MXM_MXDS_ADAPTER_0); @@ -238,6 +275,9 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev) 1 NOUVEAU_DSM_MUX_POWER)) retval |= NOUVEAU_DSM_HAS_MUX; + if (nouveau_check_gmux_dsm(dhandle)) + retval |= NOUVEAU_DSM_HAS_GMUX; + if (nouveau_check_optimus_dsm(dhandle)) retval |= NOUVEAU_DSM_HAS_OPT; @@ -263,6 +303,7 @@ static bool nouveau_dsm_detect(void) struct pci_dev *pdev = NULL; int has_mux = 0; int has_optimus = 0; + bool has_gmux = false; int vga_count = 0; bool guid_valid; int retval; @@ -283,6 +324,8 @@ static bool nouveau_dsm_detect(void) has_mux |= 1; if (retval NOUVEAU_DSM_HAS_OPT) has_optimus = 1; + if (retval NOUVEAU_DSM_HAS_GMUX) + has_gmux = true; } while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_3D 8, pdev)) != NULL) { @@ -293,9 +336,11 @@ static bool nouveau_dsm_detect(void) has_mux |= 1; if (retval NOUVEAU_DSM_HAS_OPT) has_optimus = 1; + if (retval NOUVEAU_DSM_HAS_GMUX) + has_gmux = true; } - /* find the optimus DSM or the mux DSM */ + /* find the optimus DSM, the mux DSM or the gmux DSM */ if (has_optimus == 1) { acpi_get_name(nouveau_dsm_priv.dhandle, ACPI_FULL_PATHNAME, buffer); @@ -310,6 +355,13 @@ static bool nouveau_dsm_detect(void) acpi_method_name); nouveau_dsm_priv.mux_detected = true; ret
[Nouveau] [PATCH v2 2/9] acpi: Add evaluate to name of functions evaluating _DSM
This makes it clearer when reading the function name, as well as following the names of related ACPI functions. Changes since v1: * Fix typo in commit message * Slightly reformulate the commit message to be clearer Signed-off-by: Pierre Moreau pierre.mor...@free.fr --- drm/nouveau/nouveau_acpi.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c index c90037f..e18fbeb 100644 --- a/drm/nouveau/nouveau_acpi.c +++ b/drm/nouveau/nouveau_acpi.c @@ -71,7 +71,7 @@ static const char nouveau_op_dsm_muid[] = { 0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0, }; -static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result) +static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result) { int i; union acpi_object *obj; @@ -118,7 +118,7 @@ static int nouveau_check_optimus_dsm(acpi_handle handle) * Function 0 returns a Buffer containing available functions. * The args parameter is ignored for function 0, so just put 0 in it */ - if (nouveau_optimus_dsm(handle, 0, 0, result)) + if (nouveau_evaluate_optimus_dsm(handle, 0, 0, result)) return 0; /* @@ -128,7 +128,7 @@ static int nouveau_check_optimus_dsm(acpi_handle handle) return result 1 result (1 NOUVEAU_DSM_OPTIMUS_CAPS); } -static int nouveau_mux_dsm(acpi_handle handle, int func, int arg) +static int nouveau_evaluate_mux_dsm(acpi_handle handle, int func, int arg) { int ret = 0; union acpi_object *obj; @@ -155,7 +155,7 @@ static int nouveau_dsm_switch_mux(acpi_handle handle, int mux_id) { mxm_wmi_call_mxmx(mux_id == NOUVEAU_DSM_MUX_LED_STAMINA ? MXM_MXDS_ADAPTER_IGD : MXM_MXDS_ADAPTER_0); mxm_wmi_call_mxds(mux_id == NOUVEAU_DSM_MUX_LED_STAMINA ? MXM_MXDS_ADAPTER_IGD : MXM_MXDS_ADAPTER_0); - return nouveau_mux_dsm(handle, NOUVEAU_DSM_MUX_LED, mux_id); + return nouveau_evaluate_mux_dsm(handle, NOUVEAU_DSM_MUX_LED, mux_id); } static int nouveau_dsm_set_discrete_state(acpi_handle handle, enum vga_switcheroo_state state) @@ -165,7 +165,7 @@ static int nouveau_dsm_set_discrete_state(acpi_handle handle, enum vga_switchero arg = NOUVEAU_DSM_MUX_POWER_SPEED; else arg = NOUVEAU_DSM_MUX_POWER_STAMINA; - nouveau_mux_dsm(handle, NOUVEAU_DSM_MUX_POWER, arg); + nouveau_evaluate_mux_dsm(handle, NOUVEAU_DSM_MUX_POWER, arg); return 0; } @@ -233,8 +233,8 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev) if (retval NOUVEAU_DSM_HAS_OPT) { uint32_t result; - nouveau_optimus_dsm(dhandle, NOUVEAU_DSM_OPTIMUS_CAPS, 0, - result); + nouveau_evaluate_optimus_dsm(dhandle, NOUVEAU_DSM_OPTIMUS_CAPS, +0, result); dev_info(pdev-dev, optimus capabilities: %s, status %s%s\n, (result OPTIMUS_ENABLED) ? enabled : disabled, (result OPTIMUS_DYNAMIC_PWR_CAP) ? dynamic power, : , @@ -324,11 +324,14 @@ void nouveau_switcheroo_optimus_dsm(void) if (!nouveau_dsm_priv.optimus_detected) return; - nouveau_optimus_dsm(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_OPTIMUS_FLAGS, - 0x3, result); + nouveau_evaluate_optimus_dsm(nouveau_dsm_priv.dhandle, +NOUVEAU_DSM_OPTIMUS_FLAGS, +0x3, result); - nouveau_optimus_dsm(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_OPTIMUS_CAPS, - NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN, result); + nouveau_evaluate_optimus_dsm(nouveau_dsm_priv.dhandle, +NOUVEAU_DSM_OPTIMUS_CAPS, +NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN, +result); } -- 2.4.2 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH v2 1/9] acpi: Rename v1 DSM to mux to avoid ambiguity
This is especially true when variables or functions are just called dsm without specifying the v1. Changes since v1: * Fix typo in commit explanation * Change has_dsm to has_mux in nouveau_dsm_detect Signed-off-by: Pierre Moreau pierre.mor...@free.fr --- drm/nouveau/nouveau_acpi.c | 72 +++--- drm/nouveau/nouveau_acpi.h | 4 +-- drm/nouveau/nouveau_drm.c | 4 +-- drm/nouveau/nouveau_vga.c | 10 +++ 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c index 6224246..c90037f 100644 --- a/drm/nouveau/nouveau_acpi.c +++ b/drm/nouveau/nouveau_acpi.c @@ -9,16 +9,16 @@ #include nouveau_drm.h #include nouveau_acpi.h -#define NOUVEAU_DSM_LED 0x02 -#define NOUVEAU_DSM_LED_STATE 0x00 -#define NOUVEAU_DSM_LED_OFF 0x10 -#define NOUVEAU_DSM_LED_STAMINA 0x11 -#define NOUVEAU_DSM_LED_SPEED 0x12 +#define NOUVEAU_DSM_MUX_LED 0x02 +#define NOUVEAU_DSM_MUX_LED_STATE 0x00 +#define NOUVEAU_DSM_MUX_LED_OFF 0x10 +#define NOUVEAU_DSM_MUX_LED_STAMINA 0x11 +#define NOUVEAU_DSM_MUX_LED_SPEED 0x12 -#define NOUVEAU_DSM_POWER 0x03 -#define NOUVEAU_DSM_POWER_STATE 0x00 -#define NOUVEAU_DSM_POWER_SPEED 0x01 -#define NOUVEAU_DSM_POWER_STAMINA 0x02 +#define NOUVEAU_DSM_MUX_POWER 0x03 +#define NOUVEAU_DSM_MUX_POWER_STATE 0x00 +#define NOUVEAU_DSM_MUX_POWER_SPEED 0x01 +#define NOUVEAU_DSM_MUX_POWER_STAMINA 0x02 #define NOUVEAU_DSM_OPTIMUS_CAPS 0x1A #define NOUVEAU_DSM_OPTIMUS_FLAGS 0x1B @@ -43,7 +43,7 @@ #define OPTIMUS_HDA_CODEC_MASK (2 27) /* hda bios control */ static struct nouveau_dsm_priv { - bool dsm_detected; + bool mux_detected; bool optimus_detected; acpi_handle dhandle; acpi_handle rom_handle; @@ -53,15 +53,15 @@ bool nouveau_is_optimus(void) { return nouveau_dsm_priv.optimus_detected; } -bool nouveau_is_v1_dsm(void) { - return nouveau_dsm_priv.dsm_detected; +bool nouveau_has_mux(void) { + return nouveau_dsm_priv.mux_detected; } #define NOUVEAU_DSM_HAS_MUX 0x1 #define NOUVEAU_DSM_HAS_OPT 0x2 #ifdef CONFIG_VGA_SWITCHEROO -static const char nouveau_dsm_muid[] = { +static const char nouveau_mux_dsm_muid[] = { 0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D, 0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4, }; @@ -128,7 +128,7 @@ static int nouveau_check_optimus_dsm(acpi_handle handle) return result 1 result (1 NOUVEAU_DSM_OPTIMUS_CAPS); } -static int nouveau_dsm(acpi_handle handle, int func, int arg) +static int nouveau_mux_dsm(acpi_handle handle, int func, int arg) { int ret = 0; union acpi_object *obj; @@ -137,7 +137,7 @@ static int nouveau_dsm(acpi_handle handle, int func, int arg) .integer.value = arg, }; - obj = acpi_evaluate_dsm_typed(handle, nouveau_dsm_muid, 0x0102, + obj = acpi_evaluate_dsm_typed(handle, nouveau_mux_dsm_muid, 0x0102, func, argv4, ACPI_TYPE_INTEGER); if (!obj) { acpi_handle_info(handle, failed to evaluate _DSM\n); @@ -153,30 +153,30 @@ static int nouveau_dsm(acpi_handle handle, int func, int arg) static int nouveau_dsm_switch_mux(acpi_handle handle, int mux_id) { - mxm_wmi_call_mxmx(mux_id == NOUVEAU_DSM_LED_STAMINA ? MXM_MXDS_ADAPTER_IGD : MXM_MXDS_ADAPTER_0); - mxm_wmi_call_mxds(mux_id == NOUVEAU_DSM_LED_STAMINA ? MXM_MXDS_ADAPTER_IGD : MXM_MXDS_ADAPTER_0); - return nouveau_dsm(handle, NOUVEAU_DSM_LED, mux_id); + mxm_wmi_call_mxmx(mux_id == NOUVEAU_DSM_MUX_LED_STAMINA ? MXM_MXDS_ADAPTER_IGD : MXM_MXDS_ADAPTER_0); + mxm_wmi_call_mxds(mux_id == NOUVEAU_DSM_MUX_LED_STAMINA ? MXM_MXDS_ADAPTER_IGD : MXM_MXDS_ADAPTER_0); + return nouveau_mux_dsm(handle, NOUVEAU_DSM_MUX_LED, mux_id); } static int nouveau_dsm_set_discrete_state(acpi_handle handle, enum vga_switcheroo_state state) { int arg; if (state == VGA_SWITCHEROO_ON) - arg = NOUVEAU_DSM_POWER_SPEED; + arg = NOUVEAU_DSM_MUX_POWER_SPEED; else - arg = NOUVEAU_DSM_POWER_STAMINA; - nouveau_dsm(handle, NOUVEAU_DSM_POWER, arg); + arg = NOUVEAU_DSM_MUX_POWER_STAMINA; + nouveau_mux_dsm(handle, NOUVEAU_DSM_MUX_POWER, arg); return 0; } static int nouveau_dsm_switchto(enum vga_switcheroo_client_id id) { - if (!nouveau_dsm_priv.dsm_detected) + if (!nouveau_dsm_priv.mux_detected) return 0; if (id == VGA_SWITCHEROO_IGD) - return nouveau_dsm_switch_mux(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_LED_STAMINA); + return nouveau_dsm_switch_mux(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_MUX_LED_STAMINA); else - return nouveau_dsm_switch_mux(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_LED_SPEED); + return nouveau_dsm_switch_mux(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_MUX_LED_SPEED); } static
[Nouveau] [PATCH 3/9] acpi: Define static variables for revision ids
Signed-off-by: Pierre Moreau pierre.mor...@free.fr --- drm/nouveau/nouveau_acpi.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c index e18fbeb..3f01067 100644 --- a/drm/nouveau/nouveau_acpi.c +++ b/drm/nouveau/nouveau_acpi.c @@ -61,11 +61,13 @@ bool nouveau_has_mux(void) { #define NOUVEAU_DSM_HAS_OPT 0x2 #ifdef CONFIG_VGA_SWITCHEROO +static const uint32_t nouveau_mux_dsm_rid = 0x0102; static const char nouveau_mux_dsm_muid[] = { 0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D, 0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4, }; +static const uint32_t nouveau_op_dsm_rid = 0x0100; static const char nouveau_op_dsm_muid[] = { 0xF8, 0xD8, 0x86, 0xA4, 0xDA, 0x0B, 0x1B, 0x47, 0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0, @@ -87,7 +89,7 @@ static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, u args_buff[i] = (arg i * 8) 0xFF; *result = 0; - obj = acpi_evaluate_dsm_typed(handle, nouveau_op_dsm_muid, 0x0100, + obj = acpi_evaluate_dsm_typed(handle, nouveau_op_dsm_muid, nouveau_op_dsm_rid, func, argv4, ACPI_TYPE_BUFFER); if (!obj) { acpi_handle_info(handle, failed to evaluate _DSM\n); @@ -137,7 +139,7 @@ static int nouveau_evaluate_mux_dsm(acpi_handle handle, int func, int arg) .integer.value = arg, }; - obj = acpi_evaluate_dsm_typed(handle, nouveau_mux_dsm_muid, 0x0102, + obj = acpi_evaluate_dsm_typed(handle, nouveau_mux_dsm_muid, nouveau_mux_dsm_rid, func, argv4, ACPI_TYPE_INTEGER); if (!obj) { acpi_handle_info(handle, failed to evaluate _DSM\n); @@ -224,7 +226,7 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev) if (!acpi_has_method(dhandle, _DSM)) return false; - if (acpi_check_dsm(dhandle, nouveau_mux_dsm_muid, 0x0102, + if (acpi_check_dsm(dhandle, nouveau_mux_dsm_muid, nouveau_mux_dsm_rid, 1 NOUVEAU_DSM_MUX_POWER)) retval |= NOUVEAU_DSM_HAS_MUX; -- 2.4.2 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH v2 9/9] acpi: Move detecting available _DSM outside of while loops
Changes since v1: * Re-write the whole patch to detect available _DSMs when we enable them rather than on each loop run Signed-off-by: Pierre Moreau pierre.mor...@free.fr --- drm/nouveau/nouveau_acpi.c | 27 ++- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c index ee5fcfa..a970e41 100644 --- a/drm/nouveau/nouveau_acpi.c +++ b/drm/nouveau/nouveau_acpi.c @@ -301,12 +301,9 @@ static bool nouveau_dsm_detect(void) char acpi_method_name[255] = { 0 }; struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name}; struct pci_dev *pdev = NULL; - int has_mux = 0; - int has_optimus = 0; - bool has_gmux = false; int vga_count = 0; bool guid_valid; - int retval; + int retval = 0; bool ret = false; /* lookup the MXM GUID */ @@ -319,43 +316,31 @@ static bool nouveau_dsm_detect(void) while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA 8, pdev)) != NULL) { vga_count++; - retval = nouveau_dsm_pci_probe(pdev); - if (retval NOUVEAU_DSM_HAS_MUX) - has_mux |= 1; - if (retval NOUVEAU_DSM_HAS_OPT) - has_optimus = 1; - if (retval NOUVEAU_DSM_HAS_GMUX) - has_gmux = true; + retval |= nouveau_dsm_pci_probe(pdev); } while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_3D 8, pdev)) != NULL) { vga_count++; - retval = nouveau_dsm_pci_probe(pdev); - if (retval NOUVEAU_DSM_HAS_MUX) - has_mux |= 1; - if (retval NOUVEAU_DSM_HAS_OPT) - has_optimus = 1; - if (retval NOUVEAU_DSM_HAS_GMUX) - has_gmux = true; + retval |= nouveau_dsm_pci_probe(pdev); } /* find the optimus DSM, the mux DSM or the gmux DSM */ - if (has_optimus == 1) { + if (retval NOUVEAU_DSM_HAS_OPT) { acpi_get_name(nouveau_dsm_priv.dhandle, ACPI_FULL_PATHNAME, buffer); printk(KERN_INFO VGA switcheroo: detected Optimus DSM method %s handle\n, acpi_method_name); nouveau_dsm_priv.optimus_detected = true; ret = true; - } else if (vga_count == 2 has_mux guid_valid) { + } else if (vga_count == 2 (retval NOUVEAU_DSM_HAS_MUX) guid_valid) { acpi_get_name(nouveau_dsm_priv.dhandle, ACPI_FULL_PATHNAME, buffer); printk(KERN_INFO VGA switcheroo: detected mux DSM switching method %s handle\n, acpi_method_name); nouveau_dsm_priv.mux_detected = true; ret = true; - } else if (has_gmux) { + } else if (retval NOUVEAU_DSM_HAS_GMUX) { acpi_get_name(nouveau_dsm_priv.dhandle, ACPI_FULL_PATHNAME, buffer); printk(KERN_INFO VGA switcheroo: detected gmux DSM switching method %s handle\n, -- 2.4.2 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH v2 4/9] acpi: Allow evaluate_optimus_dsm to take NULL results
Changes since v1: * Fix check for result being not NULL in nouveau_evaluate_optimus_dsm Signed-off-by: Pierre Moreau pierre.mor...@free.fr --- drm/nouveau/nouveau_acpi.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c index 3f01067..01dbf1d 100644 --- a/drm/nouveau/nouveau_acpi.c +++ b/drm/nouveau/nouveau_acpi.c @@ -88,15 +88,14 @@ static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, u for (i = 0; i 4; i++) args_buff[i] = (arg i * 8) 0xFF; - *result = 0; obj = acpi_evaluate_dsm_typed(handle, nouveau_op_dsm_muid, nouveau_op_dsm_rid, func, argv4, ACPI_TYPE_BUFFER); if (!obj) { acpi_handle_info(handle, failed to evaluate _DSM\n); return AE_ERROR; } else { - if (obj-buffer.length == 4) { - *result |= obj-buffer.pointer[0]; + if (result obj-buffer.length == 4) { + *result = obj-buffer.pointer[0]; *result |= (obj-buffer.pointer[1] 8); *result |= (obj-buffer.pointer[2] 16); *result |= (obj-buffer.pointer[3] 24); @@ -322,18 +321,17 @@ void nouveau_register_dsm_handler(void) /* Must be called for Optimus models before the card can be turned off */ void nouveau_switcheroo_optimus_dsm(void) { - u32 result = 0; if (!nouveau_dsm_priv.optimus_detected) return; nouveau_evaluate_optimus_dsm(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_OPTIMUS_FLAGS, -0x3, result); +0x3, NULL); nouveau_evaluate_optimus_dsm(nouveau_dsm_priv.dhandle, NOUVEAU_DSM_OPTIMUS_CAPS, NOUVEAU_DSM_OPTIMUS_SET_POWERDOWN, -result); +NULL); } -- 2.4.2 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH v2 6/9] acpi: Check returned object type by Optimus _DSM locally
Most _DSM will return an integer value of 0x8002 when given an unknown UUID, revision ID or function ID. Checking locally allows us to differentiate that case from other ACPI errors, and to not report a failed to evaluate _DSM if 0x8002 is returned which was confusing. Changes since v1: * Replace ACPI errors with standard kernel ones Signed-off-by: Pierre Moreau pierre.mor...@free.fr --- drm/nouveau/nouveau_acpi.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c index b837ab1..44a7328 100644 --- a/drm/nouveau/nouveau_acpi.c +++ b/drm/nouveau/nouveau_acpi.c @@ -88,12 +88,12 @@ static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, u for (i = 0; i 4; i++) args_buff[i] = (arg i * 8) 0xFF; - obj = acpi_evaluate_dsm_typed(handle, nouveau_op_dsm_muid, nouveau_op_dsm_rid, - func, argv4, ACPI_TYPE_BUFFER); + obj = acpi_evaluate_dsm(handle, nouveau_op_dsm_muid, nouveau_op_dsm_rid, + func, argv4); if (!obj) { acpi_handle_info(handle, failed to evaluate _DSM\n); return -EINVAL; - } else { + } else if (obj-type == ACPI_TYPE_BUFFER) { if (result obj-buffer.length == 4) { *result = obj-buffer.pointer[0]; *result |= (obj-buffer.pointer[1] 8); @@ -101,6 +101,15 @@ static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, u *result |= (obj-buffer.pointer[3] 24); } ACPI_FREE(obj); + } else if (obj-type == ACPI_TYPE_INTEGER + obj-integer.value == 0x8002) { + acpi_handle_debug(handle, failed to query Optimus _DSM\n); + ACPI_FREE(obj); + return -ENODEV; + } else { + acpi_handle_err(handle, unexpected returned value by Optimus _DSM\n); + ACPI_FREE(obj); + return -EINVAL; } return 0; -- 2.4.2 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH NEW 5/9] acpi: Use a single type of errors in evaluate functions
Signed-off-by: Pierre Moreau pierre.mor...@free.fr --- drm/nouveau/nouveau_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c index 01dbf1d..b837ab1 100644 --- a/drm/nouveau/nouveau_acpi.c +++ b/drm/nouveau/nouveau_acpi.c @@ -92,7 +92,7 @@ static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, u func, argv4, ACPI_TYPE_BUFFER); if (!obj) { acpi_handle_info(handle, failed to evaluate _DSM\n); - return AE_ERROR; + return -EINVAL; } else { if (result obj-buffer.length == 4) { *result = obj-buffer.pointer[0]; @@ -142,7 +142,7 @@ static int nouveau_evaluate_mux_dsm(acpi_handle handle, int func, int arg) func, argv4, ACPI_TYPE_INTEGER); if (!obj) { acpi_handle_info(handle, failed to evaluate _DSM\n); - return AE_ERROR; + return -EINVAL; } else { if (obj-integer.value == 0x8002) ret = -ENODEV; -- 2.4.2 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [PATCH 7/9] acpi: Improve some messages level and content
Signed-off-by: Pierre Moreau pierre.mor...@free.fr --- drm/nouveau/nouveau_acpi.c | 8 drm/nouveau/nouveau_vga.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c index 44a7328..edc4b94 100644 --- a/drm/nouveau/nouveau_acpi.c +++ b/drm/nouveau/nouveau_acpi.c @@ -91,7 +91,7 @@ static int nouveau_evaluate_optimus_dsm(acpi_handle handle, int func, int arg, u obj = acpi_evaluate_dsm(handle, nouveau_op_dsm_muid, nouveau_op_dsm_rid, func, argv4); if (!obj) { - acpi_handle_info(handle, failed to evaluate _DSM\n); + acpi_handle_err(handle, failed to evaluate Optimus _DSM\n); return -EINVAL; } else if (obj-type == ACPI_TYPE_BUFFER) { if (result obj-buffer.length == 4) { @@ -150,7 +150,7 @@ static int nouveau_evaluate_mux_dsm(acpi_handle handle, int func, int arg) obj = acpi_evaluate_dsm_typed(handle, nouveau_mux_dsm_muid, nouveau_mux_dsm_rid, func, argv4, ACPI_TYPE_INTEGER); if (!obj) { - acpi_handle_info(handle, failed to evaluate _DSM\n); + acpi_handle_err(handle, failed to evaluate mux _DSM\n); return -EINVAL; } else { if (obj-integer.value == 0x8002) @@ -272,7 +272,7 @@ static bool nouveau_dsm_detect(void) guid_valid = mxm_wmi_supported(); if (guid_valid) - printk(MXM: GUID detected in BIOS\n); + printk(KERN_INFO MXM: GUID detected in BIOS\n); /* now do DSM detection */ while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA 8, pdev)) != NULL) { @@ -375,7 +375,7 @@ static int nouveau_rom_call(acpi_handle rom_handle, uint8_t *bios, status = acpi_evaluate_object(rom_handle, NULL, rom_arg, buffer); if (ACPI_FAILURE(status)) { - printk(KERN_INFO failed to evaluate ROM got %s\n, acpi_format_exception(status)); + printk(KERN_ERR ACPI: failed to evaluate ROM got %s\n, acpi_format_exception(status)); return -ENODEV; } obj = (union acpi_object *)buffer.pointer; diff --git a/drm/nouveau/nouveau_vga.c b/drm/nouveau/nouveau_vga.c index 6297566..9a6328f 100644 --- a/drm/nouveau/nouveau_vga.c +++ b/drm/nouveau/nouveau_vga.c @@ -40,13 +40,13 @@ nouveau_switcheroo_set_state(struct pci_dev *pdev, return; if (state == VGA_SWITCHEROO_ON) { - printk(KERN_ERR VGA switcheroo: switched nouveau on\n); + printk(KERN_INFO VGA switcheroo: switched nouveau on\n); dev-switch_power_state = DRM_SWITCH_POWER_CHANGING; nouveau_pmops_resume(pdev-dev); drm_kms_helper_poll_enable(dev); dev-switch_power_state = DRM_SWITCH_POWER_ON; } else { - printk(KERN_ERR VGA switcheroo: switched nouveau off\n); + printk(KERN_INFO VGA switcheroo: switched nouveau off\n); dev-switch_power_state = DRM_SWITCH_POWER_CHANGING; drm_kms_helper_poll_disable(dev); nouveau_switcheroo_optimus_dsm(); -- 2.4.2 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH v2 8/9] acpi: Add support for Apple Gmux _DMS
Hi Dave, - Mail original - Changes since v1: [...] diff --git a/drm/nouveau/nouveau_vga.c b/drm/nouveau/nouveau_vga.c index 9a6328f..7b13804 100644 --- a/drm/nouveau/nouveau_vga.c +++ b/drm/nouveau/nouveau_vga.c @@ -36,7 +36,7 @@ nouveau_switcheroo_set_state(struct pci_dev *pdev, { struct drm_device *dev = pci_get_drvdata(pdev); - if ((nouveau_is_optimus() || nouveau_has_mux()) state == VGA_SWITCHEROO_OFF) If I understand it correctly, if the laptop is an Optimus one or has a mux, we are not allowed to opt-out of DynPwr/DynOff by powering down the card? In the same commit adding this conditional (5addcf0a5f0fadceba6bd562d0616a1c5d4c1a4d), you added the possibility to enable/disable dynpm. How is it supposed to work, by simply echo'ing ON or OFF to vga_switcheroo/switch? Then I probably forgot some stuff as it doesn't want to work on my laptop. Pierre + if (nouveau_has_dsm() state == VGA_SWITCHEROO_OFF) return; if (state == VGA_SWITCHEROO_ON) { @@ -96,11 +96,11 @@ nouveau_vga_init(struct nouveau_drm *drm) if (nouveau_runtime_pm == 1) runtime = true; - if ((nouveau_runtime_pm == -1) (nouveau_is_optimus() || nouveau_has_mux())) + if ((nouveau_runtime_pm == -1) nouveau_has_dsm()) runtime = true; vga_switcheroo_register_client(dev-pdev, nouveau_switcheroo_ops, runtime); - if (runtime nouveau_has_mux() !nouveau_is_optimus()) + if (runtime (nouveau_has_mux() || nouveau_has_gmux()) !nouveau_is_optimus()) vga_switcheroo_init_domain_pm_ops(drm-dev-dev, drm-vga_pm_domain); } @@ -112,11 +112,11 @@ nouveau_vga_fini(struct nouveau_drm *drm) if (nouveau_runtime_pm == 1) runtime = true; - if ((nouveau_runtime_pm == -1) (nouveau_is_optimus() || nouveau_has_mux())) + if ((nouveau_runtime_pm == -1) nouveau_has_dsm()) runtime = true; vga_switcheroo_unregister_client(dev-pdev); - if (runtime nouveau_has_mux() !nouveau_is_optimus()) + if (runtime (nouveau_has_mux() || nouveau_has_gmux()) !nouveau_is_optimus()) vga_switcheroo_fini_domain_pm_ops(drm-dev-dev); vga_client_register(dev-pdev, NULL, NULL, NULL); } -- 2.4.2 ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 77003] [NV50] Fan speed to high with Kernel versions 3.13.x - Nvidia GeForce GTS 240 (NV92)
https://bugs.freedesktop.org/show_bug.cgi?id=77003 Roman Spirgi the@gmx.net changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #8 from Roman Spirgi the@gmx.net --- Obsolete, changed my hardware -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 90276] [NVE4] read fault error, bisected
https://bugs.freedesktop.org/show_bug.cgi?id=90276 Arthur Heymans arthurphilippeheym...@gmail.com changed: What|Removed |Added Summary|[NVE6] screen freeze with |[NVE4] read fault error, |PDISP errors, bisected |bisected -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #23 from andrew p. pan.pav@gmail.com --- (In reply to Ilia Mirkin from comment #22) Ben tells me that nouveau_bo_wait (called by nouveau_bo_map) ends up doing this anyways. Oh well. Is it bad, right? So, no hope in the near future? -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 89730] NV50: LightDM GTK+ Greeter Background - inconsistent display
https://bugs.freedesktop.org/show_bug.cgi?id=89730 --- Comment #24 from Ilia Mirkin imir...@alum.mit.edu --- (In reply to andrew p. from comment #23) (In reply to Ilia Mirkin from comment #22) Ben tells me that nouveau_bo_wait (called by nouveau_bo_map) ends up doing this anyways. Oh well. Is it bad, right? So, no hope in the near future? It's good that it does that. It's bad for figuring out what the cause of the bug is. *Ideally* someone would submit an x11trace (aka xtrace too) of the buggy application so that we can better see what's going on. I have no experience analyzing such traces, but everything should be in there... -- You are receiving this mail because: You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau