From: Yijing Wang <hidden> Date: 2013-06-26 01:16:04
Pci core has been saved pm cap register offset by pdev->pm_cap in pci_pm_init()
in init path. So we can use pdev->pm_cap instead of using
pci_find_capability(pdev, PCI_CAP_ID_PM) for better performance and simplified code.
Signed-off-by: Yijing Wang <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jean-Christophe Plagniol-Villard <redacted>
Cc: Tomi Valkeinen <redacted>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/video/aty/radeon_pm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
From: Tomi Valkeinen <hidden> Date: 2013-06-26 13:15:52
On 26/06/13 04:13, Yijing Wang wrote:
quoted hunk
Pci core has been saved pm cap register offset by pdev->pm_cap in pci_pm_init()
in init path. So we can use pdev->pm_cap instead of using
pci_find_capability(pdev, PCI_CAP_ID_PM) for better performance and simplified code.
Signed-off-by: Yijing Wang <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jean-Christophe Plagniol-Villard <redacted>
Cc: Tomi Valkeinen <redacted>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/video/aty/radeon_pm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
@@ -2805,7 +2805,7 @@ static void radeonfb_early_resume(void *data)voidradeonfb_pm_init(structradeonfb_info*rinfo,intdynclk,intignore_devlist,intforce_sleep){/* Find PM registers in config space if any*/-rinfo->pm_reg=pci_find_capability(rinfo->pdev,PCI_CAP_ID_PM);+rinfo->pm_reg=rinfo->pdev->pm_cap;/* Enable/Disable dynamic clocks: TODO add sysfs access */if(rinfo->family==CHIP_FAMILY_RS480)
I couldn't find the rest of this series, and I'm not familiar with PCI.
So: is this patch and "aty128fb: use pdev->pm_cap instead of
pci_find_capability(..,PCI_CAP_ID_PM)" safe to apply for fbdev-3.11
without anything else? I.e. has the PCI core changes been merged in 3.10
or ealier?
Tomi
From: Yijing Wang <hidden> Date: 2013-06-27 01:52:32
On 2013/6/26 21:15, Tomi Valkeinen wrote:
On 26/06/13 04:13, Yijing Wang wrote:
quoted
Pci core has been saved pm cap register offset by pdev->pm_cap in pci_pm_init()
in init path. So we can use pdev->pm_cap instead of using
pci_find_capability(pdev, PCI_CAP_ID_PM) for better performance and simplified code.
Signed-off-by: Yijing Wang <redacted>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jean-Christophe Plagniol-Villard <redacted>
Cc: Tomi Valkeinen <redacted>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/video/aty/radeon_pm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
@@ -2805,7 +2805,7 @@ static void radeonfb_early_resume(void *data)voidradeonfb_pm_init(structradeonfb_info*rinfo,intdynclk,intignore_devlist,intforce_sleep){/* Find PM registers in config space if any*/-rinfo->pm_reg=pci_find_capability(rinfo->pdev,PCI_CAP_ID_PM);+rinfo->pm_reg=rinfo->pdev->pm_cap;/* Enable/Disable dynamic clocks: TODO add sysfs access */if(rinfo->family=CHIP_FAMILY_RS480)
I couldn't find the rest of this series, and I'm not familiar with PCI.
So: is this patch and "aty128fb: use pdev->pm_cap instead of
pci_find_capability(..,PCI_CAP_ID_PM)" safe to apply for fbdev-3.11
without anything else? I.e. has the PCI core changes been merged in 3.10
or ealier?
Hi Tomi,
Thanks for your reply. Yes, it's safe, because PCI core has been use pdev->pm_cap to save
the pm capability offset already. And PCI core changes related this pm init code has been merged
long long ago(since year 2008). This series changes just to simplifier driver code about pm code.
It's not necessary to access pci device register to get pm cap again, drivers can use pci device pm_cap
member. and this series had no changes in PCI core. The rest of this series like for bnx2, bnx2x etc has
been tested and accepted by other subsystems.
link:
https://patchwork.kernel.org/patch/2739861/https://patchwork.kernel.org/patch/2739761/https://patchwork.kernel.org/patch/2739771/https://patchwork.kernel.org/patch/2739801/
Thanks!
Yijing
From: Tomi Valkeinen <hidden> Date: 2013-06-27 06:34:25
On 27/06/13 04:51, Yijing Wang wrote:
On 2013/6/26 21:15, Tomi Valkeinen wrote:
quoted
I couldn't find the rest of this series, and I'm not familiar with PCI.
So: is this patch and "aty128fb: use pdev->pm_cap instead of
pci_find_capability(..,PCI_CAP_ID_PM)" safe to apply for fbdev-3.11
without anything else? I.e. has the PCI core changes been merged in 3.10
or ealier?
Hi Tomi,
Thanks for your reply. Yes, it's safe, because PCI core has been use pdev->pm_cap to save
the pm capability offset already. And PCI core changes related this pm init code has been merged
long long ago(since year 2008). This series changes just to simplifier driver code about pm code.
It's not necessary to access pci device register to get pm cap again, drivers can use pci device pm_cap
member. and this series had no changes in PCI core. The rest of this series like for bnx2, bnx2x etc has
been tested and accepted by other subsystems.
Ok, thanks. I'll apply the two patches to my fbdev-3.11 branch.
Tomi
From: Yijing Wang <hidden> Date: 2013-06-27 06:51:00
On 2013/6/27 14:34, Tomi Valkeinen wrote:
On 27/06/13 04:51, Yijing Wang wrote:
quoted
On 2013/6/26 21:15, Tomi Valkeinen wrote:
quoted
quoted
I couldn't find the rest of this series, and I'm not familiar with PCI.
So: is this patch and "aty128fb: use pdev->pm_cap instead of
pci_find_capability(..,PCI_CAP_ID_PM)" safe to apply for fbdev-3.11
without anything else? I.e. has the PCI core changes been merged in 3.10
or ealier?
Hi Tomi,
Thanks for your reply. Yes, it's safe, because PCI core has been use pdev->pm_cap to save
the pm capability offset already. And PCI core changes related this pm init code has been merged
long long ago(since year 2008). This series changes just to simplifier driver code about pm code.
It's not necessary to access pci device register to get pm cap again, drivers can use pci device pm_cap
member. and this series had no changes in PCI core. The rest of this series like for bnx2, bnx2x etc has
been tested and accepted by other subsystems.
Ok, thanks. I'll apply the two patches to my fbdev-3.11 branch.
Tomi