From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FE48C433F8 for ; Mon, 27 Jul 2020 14:29:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3149820663 for ; Mon, 27 Jul 2020 14:29:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3149820663 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bugzilla.kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8838A89C1F; Mon, 27 Jul 2020 14:29:08 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id D7A8289C1F for ; Mon, 27 Jul 2020 14:29:06 +0000 (UTC) From: bugzilla-daemon@bugzilla.kernel.org To: dri-devel@lists.freedesktop.org Subject: [Bug 208661] Backlight doesn't work with both nv_backlight and acpi_video Date: Mon, 27 Jul 2020 14:29:06 +0000 X-Bugzilla-Reason: None X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: AssignedTo drivers_video-dri@kernel-bugs.osdl.org X-Bugzilla-Product: Drivers X-Bugzilla-Component: Video(DRI - non Intel) X-Bugzilla-Version: 2.5 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: imirkin@alum.mit.edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: drivers_video-dri@kernel-bugs.osdl.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugzilla.kernel.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" https://bugzilla.kernel.org/show_bug.cgi?id=208661 --- Comment #6 from Ilia Mirkin (imirkin@alum.mit.edu) --- After a lot of debugging on IRC, here are a few facts that are worth recording: 1. The nv_backlight "method" works -- i.e. the backlight is hooked up to the GPU. Adjusting brightness via acpi_video connects to the same mechanism somehow. We didn't dig too deep to figure out how, since it's not really important. 2. At the start of the mmiotrace, the NVIDIA driver fixes up 0xe100 ("PNVIO.GPIO_MODE_0") to be have the 0x4 bit set of the SOR mask. On bootup it's 0x00180100, while it should be 0x001c0100. 3. This is equivalent to what we do in nv50_gpio_reset. This function is called in response to the "GPIO" init table method (which, one might mention, is present in the init tables). 4. Manually setting this value (via nvapoke) makes nv_backlight work. Doing suspend/resume, which causes init tables to be re-run, makes nv_backlight also work, since the init table contains the GPIO opcode. 5. Regular boot with NvForcePost=1 kills the panel (and maybe other things). Not sure what the solution is. Right now we run nv50_gpio_reset unconditionally on MBP10,1. We can start extending the DMI table with random laptops, or maybe we can just run that function unconditionally. Is there a downside? -- You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel