Skip to contentSkip to conversation

staging: sm750fb: rename pv_reg to io_base

PATCH In review Onish Sharma 2 participants 5 messages May 29 – Jun 20 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 staging: sm750fb: rename pv_reg to io_base

Rename pv_reg to io_base to follow kernel naming style and improve readability.

No functional changes intended.

---
Changes in v3:
- Added mandatory Signed-off-by line.
- Rename pv_reg to io_base to remove hungarian notation

 drivers/staging/sm750fb/sm750.c    |  4 ++--
 drivers/staging/sm750fb/sm750.h    |  2 +-
 drivers/staging/sm750fb/sm750_hw.c | 12 ++++++------
 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/sm750fb/sm750.c +2 -2
index 716a8935f58d..c2d2864f135b 100644
@@ -743,7 +743,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
 	 * must be set after crtc member initialized
 	 */
 	crtc->cursor.offset = crtc->o_screen + crtc->vidmem_size - 1024;
-	crtc->cursor.mmio = sm750_dev->pv_reg +
+	crtc->cursor.mmio = sm750_dev->io_base +
 		0x800f0 + (int)crtc->channel * 0x140;
 
 	crtc->cursor.max_h = 64;
@@ -1047,7 +1047,7 @@ static void lynxfb_pci_remove(struct pci_dev *pdev)
 	sm750fb_framebuffer_release(sm750_dev);
 	arch_phys_wc_del(sm750_dev->mtrr.vram);
 
-	iounmap(sm750_dev->pv_reg);
+	iounmap(sm750_dev->io_base);
 	iounmap(sm750_dev->vmem);
 	pci_release_region(pdev, 1);
 	kfree(g_settings);
drivers/staging/sm750fb/sm750.h +1 -1
index e8885133da2e..c42800313c6a 100644
@@ -97,7 +97,7 @@ struct sm750_dev {
 	unsigned long vidreg_start;
 	__u32 vidmem_size;
 	__u32 vidreg_size;
-	void __iomem *pv_reg;
+	void __iomem *io_base;
 	unsigned char __iomem *vmem;
 	/* locks*/
 	spinlock_t slock;
drivers/staging/sm750fb/sm750_hw.c +6 -6
index 95f797e5776a..dc1118808b4f 100644
@@ -23,18 +23,18 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
 	}
 
 	/* now map mmio and vidmem */
-	sm750_dev->pv_reg =
+	sm750_dev->io_base =
 		ioremap(sm750_dev->vidreg_start, sm750_dev->vidreg_size);
-	if (!sm750_dev->pv_reg) {
+	if (!sm750_dev->io_base) {
 		dev_err(&pdev->dev, "mmio failed\n");
 		ret = -EFAULT;
 		goto err_release_region;
 	}
 
-	sm750_dev->accel.dpr_base = sm750_dev->pv_reg + DE_BASE_ADDR_TYPE1;
-	sm750_dev->accel.dp_port_base = sm750_dev->pv_reg + DE_PORT_ADDR_TYPE1;
+	sm750_dev->accel.dpr_base = sm750_dev->io_base + DE_BASE_ADDR_TYPE1;
+	sm750_dev->accel.dp_port_base = sm750_dev->io_base + DE_PORT_ADDR_TYPE1;
 
-	mmio750 = sm750_dev->pv_reg;
+	mmio750 = sm750_dev->io_base;
 	sm750_set_chip_type(sm750_dev->devid, sm750_dev->revid);
 
 	sm750_dev->vidmem_start = pci_resource_start(pdev, 0);
@@ -58,7 +58,7 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
 	return 0;
 
 err_unmap_reg:
-	iounmap(sm750_dev->pv_reg);
+	iounmap(sm750_dev->io_base);
 err_release_region:
 	pci_release_region(pdev, 1);
 	return ret;
Signature · 1 line
2.54.0

A message that is not in the archive (sent off-list or not yet received): CAOWJOptv1JcOGcEt39HVy7LkpAsvzbw9yj64kJG+X5J=VbWrMA@mail.gmail.com

author
#2 lore raw

Hi everyone,

Just following up on this patch to ensure it didn't get lost in the queue. Please let me know if any changes or a V4 are needed.

Thanks,
Onish

Quoted 101 lines · neha arora

Hi everyone,

Just following up on this patch to ensure it didn't get lost in the queue. Please let me know if any changes or a V4 are needed.

Thanks,
Onish

Quoted 91 lines · Onish Sharma

Rename pv_reg to io_base to follow kernel naming style and improve readability.

No functional changes intended.

---
Changes in v3:
- Added mandatory Signed-off-by line.
- Rename pv_reg to io_base to remove hungarian notation

 drivers/staging/sm750fb/sm750.c    |  4 ++--
 drivers/staging/sm750fb/sm750.h    |  2 +-
 drivers/staging/sm750fb/sm750_hw.c | 12 ++++++------
 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/sm750fb/sm750.c +2 -2
index 716a8935f58d..c2d2864f135b 100644
@@ -743,7 +743,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
         * must be set after crtc member initialized
         */
        crtc->cursor.offset = crtc->o_screen + crtc->vidmem_size - 1024;
-       crtc->cursor.mmio = sm750_dev->pv_reg +
+       crtc->cursor.mmio = sm750_dev->io_base +
                0x800f0 + (int)crtc->channel * 0x140;
 
        crtc->cursor.max_h = 64;
@@ -1047,7 +1047,7 @@ static void lynxfb_pci_remove(struct pci_dev *pdev)
        sm750fb_framebuffer_release(sm750_dev);
        arch_phys_wc_del(sm750_dev->mtrr.vram);
 
-       iounmap(sm750_dev->pv_reg);
+       iounmap(sm750_dev->io_base);
        iounmap(sm750_dev->vmem);
        pci_release_region(pdev, 1);
        kfree(g_settings);
drivers/staging/sm750fb/sm750.h +1 -1
index e8885133da2e..c42800313c6a 100644
@@ -97,7 +97,7 @@ struct sm750_dev {
        unsigned long vidreg_start;
        __u32 vidmem_size;
        __u32 vidreg_size;
-       void __iomem *pv_reg;
+       void __iomem *io_base;
        unsigned char __iomem *vmem;
        /* locks*/
        spinlock_t slock;
drivers/staging/sm750fb/sm750_hw.c +6 -7
index 95f797e5776a..dc1118808b4f 100644
@@ -23,18 +23,18 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
        }
 
        /* now map mmio and vidmem */
-       sm750_dev->pv_reg =
+       sm750_dev->io_base =
                ioremap(sm750_dev->vidreg_start, sm750_dev->vidreg_size);
-       if (!sm750_dev->pv_reg) {
+       if (!sm750_dev->io_base) {
                dev_err(&pdev->dev, "mmio failed\n");
                ret = -EFAULT;
                goto err_release_region;
        }
 
-       sm750_dev->accel.dpr_base = sm750_dev->pv_reg + DE_BASE_ADDR_TYPE1;
-       sm750_dev->accel.dp_port_base = sm750_dev->pv_reg + DE_PORT_ADDR_TYPE1;
+       sm750_dev->accel.dpr_base = sm750_dev->io_base + DE_BASE_ADDR_TYPE1;
+       sm750_dev->accel.dp_port_base = sm750_dev->io_base + DE_PORT_ADDR_TYPE1;
 
-       mmio750 = sm750_dev->pv_reg;
+       mmio750 = sm750_dev->io_base;
        sm750_set_chip_type(sm750_dev->devid, sm750_dev->revid);
 
        sm750_dev->vidmem_start = pci_resource_start(pdev, 0);
@@ -58,7 +58,7 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
        return 0;
 
 err_unmap_reg:
-       iounmap(sm750_dev->pv_reg);
+       iounmap(sm750_dev->io_base);
 err_release_region:
        pci_release_region(pdev, 1);
        return ret;
--

2.54.0

#3 lore raw
Quoted 5 lines · neha arora

Hi everyone,

Just following up on this patch to ensure it didn't get lost in the queue. Please let me know if any changes or a V4 are needed.

It doesn't apply to linux-next. Did you work against the lastest devel-next tree?

regards,
dan carpenter

author
#4 lore raw

Hi Dan,

Please disregard my previous patch submission.

I am currently working on a complete rewrite of the sm750fb staging driver into a modern, KMS-based DRM driver (sm750drm). Because this is a complete architectural overhaul, I am building it outside the staging tree structure.

Once the sm750drm driver framework is stable and ready for a RFC (Request for Comments), I will submit the entire new subsystem patch series directly to the dri-devel mailing list and CC you.

Thank you for your review and your time!

Regards,
Onish

Quoted 14 lines · Dan Carpenter
Quoted 5 lines · neha arora

Hi everyone,

Just following up on this patch to ensure it didn't get lost in the queue. Please let me know if any changes or a V4 are needed.

It doesn't apply to linux-next. Did you work against the lastest devel-next tree?

regards,
dan carpenter

author
#5 lore raw

Hi everyone,

After further investigation, and feedback from maintainers, I have concluded that porting DRM to the SM750, will cause a huge performance regression as DRM has no interface for 2D acceleration, making the CPU do graphics, which is slow, the only way to expose 2D acceleration is custom IOCTLs, which is not preferable.

So, it is best to keep using the fbdev stack for the SM750.

Regards,
Onish

Quoted 35 lines · neha arora

Hi Dan,

Please disregard my previous patch submission.

I am currently working on a complete rewrite of the sm750fb staging driver into a modern, KMS-based DRM driver (sm750drm). Because this is a complete architectural overhaul, I am building it outside the staging tree structure.

Once the sm750drm driver framework is stable and ready for a RFC (Request for Comments), I will submit the entire new subsystem patch series directly to the dri-devel mailing list and CC you.

Thank you for your review and your time!

Regards,
Onish

Quoted 14 lines · Dan Carpenter
Quoted 5 lines · neha arora

Hi everyone,

Just following up on this patch to ensure it didn't get lost in the queue. Please let me know if any changes or a V4 are needed.

It doesn't apply to linux-next. Did you work against the lastest devel-next tree?

regards,
dan carpenter