From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sylvain BERTRAND Subject: [radeonsi] dpm: mc_reg_table slots Date: Thu, 23 Jan 2014 14:57:47 +0100 Message-ID: <20140123135747.GA298@freedom> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from bounce-vit-1.online.net (bounce-vit-1.online.net [88.190.253.79]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B2F2FBF96 for ; Thu, 23 Jan 2014 06:23:58 -0800 (PST) Received: from [88.190.253.76] (helo=smtpauth-vit.online.net) by bounce-vit-1.online.net with esmtpa (Exim 4.71) (envelope-from ) id 1W6Kmz-00038V-KC for dri-devel@lists.freedesktop.org; Thu, 23 Jan 2014 14:57:49 +0100 Received: from [88.188.175.165] (helo=localhost) by smtpauth-vit.online.net with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1W6Kmx-0003V3-No for dri-devel@lists.freedesktop.org; Thu, 23 Jan 2014 14:57:47 +0100 Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hi, In si_populate_smc_acpi_state function, the acpi (emergency) state is a patched version of the initial state. Then 'ACIndex = 0' for the acpi state (i.e. setting it to SISLANDS_MCREGISTERTABLE_INITIAL_SLOT) seems misleading, since ACIndex is already set to 0 (SISLANDS_MCREGISTERTABLE_INITIAL_SLOT) in si_populate_smc_initial_state. That should be removed to avoid confusion. Additionnally, that would mean the acpi state is not using its slot in the mc_reg_table, *BUT* it is used by the ulv state! Indeed ACIndex is set to 1 (SISLANDS_MCREGISTERTABLE_ACPI_SLOT) in si_populate_ulv_state function. We can see in si_populate_mc_reg_table that initial state, acpi state, ulv state and driver state have their respective mc_reg_table slot filled. Then, the previous code seems to make the ulv mc_reg_table slot unused and useless to fill. Moreover, is not following the SISLANDS_MCREGISTERTABLE_*_SLOT mc_reg_table allocation. Bug? regards, -- Sylvain