* [PATCH 0/2] video: fbdev: Convert from PCI to generic power management
@ 2022-06-07 23:11 Bjorn Helgaas
2022-06-07 23:11 ` [PATCH 1/2] video: fbdev: cirrusfb: Remove useless reference to PCI " Bjorn Helgaas
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2022-06-07 23:11 UTC (permalink / raw)
To: Helge Deller
Cc: Vaibhav Gupta, Rafael J . Wysocki, linux-fbdev, dri-devel,
linux-pm, linux-pci, linux-kernel, Bjorn Helgaas
From: Bjorn Helgaas <bhelgaas@google.com>
PCI-specific power management (pci_driver.suspend and pci_driver.resume) is
deprecated. If drivers implement power management, they should use the
generic power management framework, not the PCI-specific hooks.
No fbdev drivers actually implement PCI power management, but there are a
cirrusfb has some commented-out references to it and skeletonfb has
examples of it. Remove these.
Bjorn Helgaas (2):
video: fbdev: cirrusfb: Remove useless reference to PCI power
management
video: fbdev: skeletonfb: Convert to generic power management
drivers/video/fbdev/cirrusfb.c | 6 ------
drivers/video/fbdev/skeletonfb.c | 13 +++++++------
2 files changed, 7 insertions(+), 12 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] video: fbdev: cirrusfb: Remove useless reference to PCI power management
2022-06-07 23:11 [PATCH 0/2] video: fbdev: Convert from PCI to generic power management Bjorn Helgaas
@ 2022-06-07 23:11 ` Bjorn Helgaas
2022-06-07 23:11 ` [PATCH 2/2] video: fbdev: skeletonfb: Convert to generic " Bjorn Helgaas
2022-06-08 16:26 ` [PATCH 0/2] video: fbdev: Convert from PCI " Daniel Vetter
2 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2022-06-07 23:11 UTC (permalink / raw)
To: Helge Deller
Cc: Vaibhav Gupta, Rafael J . Wysocki, linux-fbdev, dri-devel,
linux-pm, linux-pci, linux-kernel, Bjorn Helgaas
From: Bjorn Helgaas <bhelgaas@google.com>
PCI-specific power management (pci_driver.suspend and pci_driver.resume) is
deprecated. The cirrusfb driver has never implemented power management at
all, but if it ever does, it should use the generic power management
framework, not the PCI-specific hooks.
Remove the commented-out references to the PCI-specific power management
hooks.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/video/fbdev/cirrusfb.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/video/fbdev/cirrusfb.c b/drivers/video/fbdev/cirrusfb.c
index 3d47c347b897..51e072c03e1c 100644
--- a/drivers/video/fbdev/cirrusfb.c
+++ b/drivers/video/fbdev/cirrusfb.c
@@ -2184,12 +2184,6 @@ static struct pci_driver cirrusfb_pci_driver = {
.id_table = cirrusfb_pci_table,
.probe = cirrusfb_pci_register,
.remove = cirrusfb_pci_unregister,
-#ifdef CONFIG_PM
-#if 0
- .suspend = cirrusfb_pci_suspend,
- .resume = cirrusfb_pci_resume,
-#endif
-#endif
};
#endif /* CONFIG_PCI */
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] video: fbdev: skeletonfb: Convert to generic power management
2022-06-07 23:11 [PATCH 0/2] video: fbdev: Convert from PCI to generic power management Bjorn Helgaas
2022-06-07 23:11 ` [PATCH 1/2] video: fbdev: cirrusfb: Remove useless reference to PCI " Bjorn Helgaas
@ 2022-06-07 23:11 ` Bjorn Helgaas
2022-06-08 16:26 ` [PATCH 0/2] video: fbdev: Convert from PCI " Daniel Vetter
2 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2022-06-07 23:11 UTC (permalink / raw)
To: Helge Deller
Cc: Vaibhav Gupta, Rafael J . Wysocki, linux-fbdev, dri-devel,
linux-pm, linux-pci, linux-kernel, Bjorn Helgaas
From: Bjorn Helgaas <bhelgaas@google.com>
PCI-specific power management (pci_driver.suspend and pci_driver.resume) is
deprecated. If drivers implement power management, they should use the
generic power management framework, not the PCI-specific hooks.
Convert the sample code to use the generic power management framework.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/video/fbdev/skeletonfb.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/video/fbdev/skeletonfb.c b/drivers/video/fbdev/skeletonfb.c
index bcacfb6934fa..70ba78450837 100644
--- a/drivers/video/fbdev/skeletonfb.c
+++ b/drivers/video/fbdev/skeletonfb.c
@@ -838,9 +838,9 @@ static void xxxfb_remove(struct pci_dev *dev)
*
* See Documentation/driver-api/pm/devices.rst for more information
*/
-static int xxxfb_suspend(struct pci_dev *dev, pm_message_t msg)
+static int xxxfb_suspend(struct device *dev)
{
- struct fb_info *info = pci_get_drvdata(dev);
+ struct fb_info *info = dev_get_drvdata(dev);
struct xxxfb_par *par = info->par;
/* suspend here */
@@ -853,9 +853,9 @@ static int xxxfb_suspend(struct pci_dev *dev, pm_message_t msg)
*
* See Documentation/driver-api/pm/devices.rst for more information
*/
-static int xxxfb_resume(struct pci_dev *dev)
+static int xxxfb_resume(struct device *dev)
{
- struct fb_info *info = pci_get_drvdata(dev);
+ struct fb_info *info = dev_get_drvdata(dev);
struct xxxfb_par *par = info->par;
/* resume here */
@@ -873,14 +873,15 @@ static const struct pci_device_id xxxfb_id_table[] = {
{ 0, }
};
+static SIMPLE_DEV_PM_OPS(xxxfb_pm_ops, xxxfb_suspend, xxxfb_resume);
+
/* For PCI drivers */
static struct pci_driver xxxfb_driver = {
.name = "xxxfb",
.id_table = xxxfb_id_table,
.probe = xxxfb_probe,
.remove = xxxfb_remove,
- .suspend = xxxfb_suspend, /* optional but recommended */
- .resume = xxxfb_resume, /* optional but recommended */
+ .driver.pm = xxxfb_pm_ops, /* optional but recommended */
};
MODULE_DEVICE_TABLE(pci, xxxfb_id_table);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] video: fbdev: Convert from PCI to generic power management
2022-06-07 23:11 [PATCH 0/2] video: fbdev: Convert from PCI to generic power management Bjorn Helgaas
2022-06-07 23:11 ` [PATCH 1/2] video: fbdev: cirrusfb: Remove useless reference to PCI " Bjorn Helgaas
2022-06-07 23:11 ` [PATCH 2/2] video: fbdev: skeletonfb: Convert to generic " Bjorn Helgaas
@ 2022-06-08 16:26 ` Daniel Vetter
2022-06-08 18:09 ` Bjorn Helgaas
2 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2022-06-08 16:26 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Helge Deller, linux-fbdev, linux-pm, linux-pci,
Rafael J . Wysocki, linux-kernel, dri-devel, Vaibhav Gupta,
Bjorn Helgaas
On Tue, Jun 07, 2022 at 06:11:10PM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> PCI-specific power management (pci_driver.suspend and pci_driver.resume) is
> deprecated. If drivers implement power management, they should use the
> generic power management framework, not the PCI-specific hooks.
>
> No fbdev drivers actually implement PCI power management, but there are a
> cirrusfb has some commented-out references to it and skeletonfb has
> examples of it. Remove these.
Is this holding up some cleanup on your side and so would be easier to
merge these through the pci tree? If so
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
for merging through your tree. Otherwise I guess Helge will get around to
pile them up for 5.20 (or 6.0) eventually.
Cheers, Daniel
>
> Bjorn Helgaas (2):
> video: fbdev: cirrusfb: Remove useless reference to PCI power
> management
> video: fbdev: skeletonfb: Convert to generic power management
>
> drivers/video/fbdev/cirrusfb.c | 6 ------
> drivers/video/fbdev/skeletonfb.c | 13 +++++++------
> 2 files changed, 7 insertions(+), 12 deletions(-)
>
> --
> 2.25.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] video: fbdev: Convert from PCI to generic power management
2022-06-08 16:26 ` [PATCH 0/2] video: fbdev: Convert from PCI " Daniel Vetter
@ 2022-06-08 18:09 ` Bjorn Helgaas
2022-06-20 12:40 ` Helge Deller
0 siblings, 1 reply; 6+ messages in thread
From: Bjorn Helgaas @ 2022-06-08 18:09 UTC (permalink / raw)
To: Helge Deller, linux-fbdev, linux-pm, linux-pci,
Rafael J . Wysocki, linux-kernel, dri-devel, Vaibhav Gupta,
Bjorn Helgaas
On Wed, Jun 08, 2022 at 06:26:34PM +0200, Daniel Vetter wrote:
> On Tue, Jun 07, 2022 at 06:11:10PM -0500, Bjorn Helgaas wrote:
> > From: Bjorn Helgaas <bhelgaas@google.com>
> >
> > PCI-specific power management (pci_driver.suspend and pci_driver.resume) is
> > deprecated. If drivers implement power management, they should use the
> > generic power management framework, not the PCI-specific hooks.
> >
> > No fbdev drivers actually implement PCI power management, but there are a
> > cirrusfb has some commented-out references to it and skeletonfb has
> > examples of it. Remove these.
>
> Is this holding up some cleanup on your side and so would be easier to
> merge these through the pci tree? If so
>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> for merging through your tree. Otherwise I guess Helge will get around to
> pile them up for 5.20 (or 6.0) eventually.
No particular rush and nothing depending on these.
I added your ack to my local branch and if nothing happens for a
while, I'll merge them via my tree.
Bjorn
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] video: fbdev: Convert from PCI to generic power management
2022-06-08 18:09 ` Bjorn Helgaas
@ 2022-06-20 12:40 ` Helge Deller
0 siblings, 0 replies; 6+ messages in thread
From: Helge Deller @ 2022-06-20 12:40 UTC (permalink / raw)
To: Bjorn Helgaas, linux-fbdev, linux-pm, linux-pci,
Rafael J . Wysocki, linux-kernel, dri-devel, Vaibhav Gupta,
Bjorn Helgaas
On 6/8/22 20:09, Bjorn Helgaas wrote:
> On Wed, Jun 08, 2022 at 06:26:34PM +0200, Daniel Vetter wrote:
>> On Tue, Jun 07, 2022 at 06:11:10PM -0500, Bjorn Helgaas wrote:
>>> From: Bjorn Helgaas <bhelgaas@google.com>
>>>
>>> PCI-specific power management (pci_driver.suspend and pci_driver.resume) is
>>> deprecated. If drivers implement power management, they should use the
>>> generic power management framework, not the PCI-specific hooks.
>>>
>>> No fbdev drivers actually implement PCI power management, but there are a
>>> cirrusfb has some commented-out references to it and skeletonfb has
>>> examples of it. Remove these.
>>
>> Is this holding up some cleanup on your side and so would be easier to
>> merge these through the pci tree? If so
>>
>> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>>
>> for merging through your tree. Otherwise I guess Helge will get around to
>> pile them up for 5.20 (or 6.0) eventually.
>
> No particular rush and nothing depending on these.
>
> I added your ack to my local branch and if nothing happens for a
> while, I'll merge them via my tree.
I've been on vacation, but picked them up now.
Thanks!
Helge
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-20 12:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 23:11 [PATCH 0/2] video: fbdev: Convert from PCI to generic power management Bjorn Helgaas
2022-06-07 23:11 ` [PATCH 1/2] video: fbdev: cirrusfb: Remove useless reference to PCI " Bjorn Helgaas
2022-06-07 23:11 ` [PATCH 2/2] video: fbdev: skeletonfb: Convert to generic " Bjorn Helgaas
2022-06-08 16:26 ` [PATCH 0/2] video: fbdev: Convert from PCI " Daniel Vetter
2022-06-08 18:09 ` Bjorn Helgaas
2022-06-20 12:40 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).