linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data
@ 2011-09-28 21:19 Timur Tabi
  2011-10-05  0:36 ` Timur Tabi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Timur Tabi @ 2011-09-28 21:19 UTC (permalink / raw)
  To: linux-fbdev

The diu_pool structure contains diu_addr objects for various objects
allocated in DMA space that are used by the DIU, but the only instance
of this structure is a global variable, 'pool'.  Eliminate 'pool' by
merging its fields into the fsl_diu_data structure, which is instantiated
on the heap for each DIU controller found.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 drivers/video/fsl-diu-fb.c |   72 +++++++++++++++++++++----------------------
 1 files changed, 35 insertions(+), 37 deletions(-)

diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index 728cd9f..83bc825 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -55,13 +55,6 @@ struct diu_addr {
 	__u32 offset;
 };
 
-struct diu_pool {
-	struct diu_addr ad;
-	struct diu_addr gamma;
-	struct diu_addr pallete;
-	struct diu_addr cursor;
-};
-
 /*
  * List of supported video modes
  *
@@ -349,6 +342,10 @@ struct fsl_diu_data {
 	struct diu __iomem *diu_reg;
 	spinlock_t reg_lock;
 	unsigned int mode;		/* DIU operation mode */
+	struct diu_addr ad;
+	struct diu_addr gamma;
+	struct diu_addr pallete;
+	struct diu_addr cursor;
 };
 
 enum mfb_index {
@@ -422,8 +419,6 @@ static struct mfb_info mfb_template[] = {
 	},
 };
 
-static struct diu_pool pool;
-
 /**
  * fsl_diu_name_to_port - convert a port name to a monitor port enum
  *
@@ -825,22 +820,23 @@ static void update_lcdc(struct fb_info *info)
 	hw = machine_data->diu_reg;
 
 	diu_ops.set_monitor_port(machine_data->monitor_port);
-	gamma_table_base = pool.gamma.vaddr;
-	cursor_base = pool.cursor.vaddr;
+	gamma_table_base = machine_data->gamma.vaddr;
+	cursor_base = machine_data->cursor.vaddr;
 	/* Prep for DIU init  - gamma table, cursor table */
 
 	for (i = 0; i <= 2; i++)
 		for (j = 0; j <= 255; j++)
 			*gamma_table_base++ = j;
 
-	diu_ops.set_gamma_table(machine_data->monitor_port, pool.gamma.vaddr);
+	diu_ops.set_gamma_table(machine_data->monitor_port,
+				machine_data->gamma.vaddr);
 
 	disable_lcdc(info);
 
 	/* Program DIU registers */
 
-	out_be32(&hw->gamma, pool.gamma.paddr);
-	out_be32(&hw->cursor, pool.cursor.paddr);
+	out_be32(&hw->gamma, machine_data->gamma.paddr);
+	out_be32(&hw->cursor, machine_data->cursor.paddr);
 
 	out_be32(&hw->bgnd, 0x007F7F7F); 	/* BGND */
 	out_be32(&hw->bgnd_wb, 0); 		/* BGND_WB */
@@ -1554,27 +1550,27 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
 	machine_data->monitor_port = monitor_port;
 
 	/* Area descriptor memory pool aligns to 64-bit boundary */
-	if (allocate_buf(&pdev->dev, &pool.ad,
+	if (allocate_buf(&pdev->dev, &machine_data->ad,
 			 sizeof(struct diu_ad) * FSL_AOI_NUM, 8))
 		return -ENOMEM;
 
 	/* Get memory for Gamma Table  - 32-byte aligned memory */
-	if (allocate_buf(&pdev->dev, &pool.gamma, 768, 32)) {
+	if (allocate_buf(&pdev->dev, &machine_data->gamma, 768, 32)) {
 		ret = -ENOMEM;
 		goto error;
 	}
 
 	/* For performance, cursor bitmap buffer aligns to 32-byte boundary */
-	if (allocate_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
-			 32)) {
+	if (allocate_buf(&pdev->dev, &machine_data->cursor,
+			 MAX_CURS * MAX_CURS * 2, 32)) {
 		ret = -ENOMEM;
 		goto error;
 	}
 
 	i = ARRAY_SIZE(machine_data->fsl_diu_info);
-	machine_data->dummy_ad = (struct diu_ad *)
-			((u32)pool.ad.vaddr + pool.ad.offset) + i;
-	machine_data->dummy_ad->paddr = pool.ad.paddr +
+	machine_data->dummy_ad = (struct diu_ad *)((u32)machine_data->ad.vaddr +
+			machine_data->ad.offset) + i;
+	machine_data->dummy_ad->paddr = machine_data->ad.paddr +
 			i * sizeof(struct diu_ad);
 	machine_data->dummy_aoi_virt = fsl_diu_alloc(64, &dummy_ad_addr);
 	if (!machine_data->dummy_aoi_virt) {
@@ -1603,9 +1599,10 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
 	for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++) {
 		machine_data->fsl_diu_info[i]->fix.smem_start = 0;
 		mfbi = machine_data->fsl_diu_info[i]->par;
-		mfbi->ad = (struct diu_ad *)((u32)pool.ad.vaddr
-					+ pool.ad.offset) + i;
-		mfbi->ad->paddr = pool.ad.paddr + i * sizeof(struct diu_ad);
+		mfbi->ad = (struct diu_ad *)((u32)machine_data->ad.vaddr
+					+ machine_data->ad.offset) + i;
+		mfbi->ad->paddr +			machine_data->ad.paddr + i * sizeof(struct diu_ad);
 		ret = install_fb(machine_data->fsl_diu_info[i]);
 		if (ret) {
 			dev_err(&pdev->dev, "could not register fb %d\n", i);
@@ -1637,14 +1634,14 @@ error:
 	for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
 		uninstall_fb(machine_data->fsl_diu_info[i]);
 
-	if (pool.ad.vaddr)
-		free_buf(&pdev->dev, &pool.ad,
+	if (machine_data->ad.vaddr)
+		free_buf(&pdev->dev, &machine_data->ad,
 			 sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
-	if (pool.gamma.vaddr)
-		free_buf(&pdev->dev, &pool.gamma, 768, 32);
-	if (pool.cursor.vaddr)
-		free_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
-			 32);
+	if (machine_data->gamma.vaddr)
+		free_buf(&pdev->dev, &machine_data->gamma, 768, 32);
+	if (machine_data->cursor.vaddr)
+		free_buf(&pdev->dev, &machine_data->cursor,
+			 MAX_CURS * MAX_CURS * 2, 32);
 	if (machine_data->dummy_aoi_virt)
 		fsl_diu_free(machine_data->dummy_aoi_virt, 64);
 	iounmap(machine_data->diu_reg);
@@ -1668,13 +1665,14 @@ static int fsl_diu_remove(struct platform_device *pdev)
 	free_irq_local(machine_data);
 	for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
 		uninstall_fb(machine_data->fsl_diu_info[i]);
-	if (pool.ad.vaddr)
-		free_buf(&pdev->dev, &pool.ad,
+	if (machine_data->ad.vaddr)
+		free_buf(&pdev->dev, &machine_data->ad,
 			 sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
-	if (pool.gamma.vaddr)
-		free_buf(&pdev->dev, &pool.gamma, 768, 32);
-	if (pool.cursor.vaddr)
-		free_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2, 32);
+	if (machine_data->gamma.vaddr)
+		free_buf(&pdev->dev, &machine_data->gamma, 768, 32);
+	if (machine_data->cursor.vaddr)
+		free_buf(&pdev->dev, &machine_data->cursor,
+			 MAX_CURS * MAX_CURS * 2, 32);
 	if (machine_data->dummy_aoi_virt)
 		fsl_diu_free(machine_data->dummy_aoi_virt, 64);
 	iounmap(machine_data->diu_reg);
-- 
1.7.3.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data
  2011-09-28 21:19 [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data Timur Tabi
@ 2011-10-05  0:36 ` Timur Tabi
  2011-10-05  1:28 ` Florian Tobias Schandinat
  2011-10-05  3:26 ` [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into Tabi Timur-B04825
  2 siblings, 0 replies; 4+ messages in thread
From: Timur Tabi @ 2011-10-05  0:36 UTC (permalink / raw)
  To: linux-fbdev

The diu_pool structure contains diu_addr objects for various objects
allocated in DMA space that are used by the DIU, but the only instance
of this structure is a global variable, 'pool'.  Eliminate 'pool' by
merging its fields into the fsl_diu_data structure, which is instantiated
on the heap for each DIU controller found.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 drivers/video/fsl-diu-fb.c |   73 +++++++++++++++++++++----------------------
 1 files changed, 36 insertions(+), 37 deletions(-)

diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index f9a95ab..3a5f547 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -55,13 +55,6 @@ struct diu_addr {
 	__u32 offset;
 };
 
-struct diu_pool {
-	struct diu_addr ad;
-	struct diu_addr gamma;
-	struct diu_addr pallete;
-	struct diu_addr cursor;
-};
-
 /*
  * List of supported video modes
  *
@@ -348,6 +341,11 @@ struct fsl_diu_data {
 	enum fsl_diu_monitor_port monitor_port;
 	struct diu __iomem *diu_reg;
 	spinlock_t reg_lock;
+	unsigned int mode;		/* DIU operation mode */
+	struct diu_addr ad;
+	struct diu_addr gamma;
+	struct diu_addr pallete;
+	struct diu_addr cursor;
 };
 
 enum mfb_index {
@@ -421,8 +419,6 @@ static struct mfb_info mfb_template[] = {
 	},
 };
 
-static struct diu_pool pool;
-
 /**
  * fsl_diu_name_to_port - convert a port name to a monitor port enum
  *
@@ -824,22 +820,23 @@ static void update_lcdc(struct fb_info *info)
 	hw = machine_data->diu_reg;
 
 	diu_ops.set_monitor_port(machine_data->monitor_port);
-	gamma_table_base = pool.gamma.vaddr;
-	cursor_base = pool.cursor.vaddr;
+	gamma_table_base = machine_data->gamma.vaddr;
+	cursor_base = machine_data->cursor.vaddr;
 	/* Prep for DIU init  - gamma table, cursor table */
 
 	for (i = 0; i <= 2; i++)
 		for (j = 0; j <= 255; j++)
 			*gamma_table_base++ = j;
 
-	diu_ops.set_gamma_table(machine_data->monitor_port, pool.gamma.vaddr);
+	diu_ops.set_gamma_table(machine_data->monitor_port,
+				machine_data->gamma.vaddr);
 
 	disable_lcdc(info);
 
 	/* Program DIU registers */
 
-	out_be32(&hw->gamma, pool.gamma.paddr);
-	out_be32(&hw->cursor, pool.cursor.paddr);
+	out_be32(&hw->gamma, machine_data->gamma.paddr);
+	out_be32(&hw->cursor, machine_data->cursor.paddr);
 
 	out_be32(&hw->bgnd, 0x007F7F7F); 	/* BGND */
 	out_be32(&hw->bgnd_wb, 0); 		/* BGND_WB */
@@ -1560,27 +1557,27 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
 	machine_data->monitor_port = monitor_port;
 
 	/* Area descriptor memory pool aligns to 64-bit boundary */
-	if (allocate_buf(&pdev->dev, &pool.ad,
+	if (allocate_buf(&pdev->dev, &machine_data->ad,
 			 sizeof(struct diu_ad) * FSL_AOI_NUM, 8))
 		return -ENOMEM;
 
 	/* Get memory for Gamma Table  - 32-byte aligned memory */
-	if (allocate_buf(&pdev->dev, &pool.gamma, 768, 32)) {
+	if (allocate_buf(&pdev->dev, &machine_data->gamma, 768, 32)) {
 		ret = -ENOMEM;
 		goto error;
 	}
 
 	/* For performance, cursor bitmap buffer aligns to 32-byte boundary */
-	if (allocate_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
-			 32)) {
+	if (allocate_buf(&pdev->dev, &machine_data->cursor,
+			 MAX_CURS * MAX_CURS * 2, 32)) {
 		ret = -ENOMEM;
 		goto error;
 	}
 
 	i = ARRAY_SIZE(machine_data->fsl_diu_info);
-	machine_data->dummy_ad = (struct diu_ad *)
-			((u32)pool.ad.vaddr + pool.ad.offset) + i;
-	machine_data->dummy_ad->paddr = pool.ad.paddr +
+	machine_data->dummy_ad = (struct diu_ad *)((u32)machine_data->ad.vaddr +
+			machine_data->ad.offset) + i;
+	machine_data->dummy_ad->paddr = machine_data->ad.paddr +
 			i * sizeof(struct diu_ad);
 	machine_data->dummy_aoi_virt = fsl_diu_alloc(64, &dummy_ad_addr);
 	if (!machine_data->dummy_aoi_virt) {
@@ -1609,9 +1606,10 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
 	for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++) {
 		machine_data->fsl_diu_info[i]->fix.smem_start = 0;
 		mfbi = machine_data->fsl_diu_info[i]->par;
-		mfbi->ad = (struct diu_ad *)((u32)pool.ad.vaddr
-					+ pool.ad.offset) + i;
-		mfbi->ad->paddr = pool.ad.paddr + i * sizeof(struct diu_ad);
+		mfbi->ad = (struct diu_ad *)((u32)machine_data->ad.vaddr
+					+ machine_data->ad.offset) + i;
+		mfbi->ad->paddr +			machine_data->ad.paddr + i * sizeof(struct diu_ad);
 		ret = install_fb(machine_data->fsl_diu_info[i]);
 		if (ret) {
 			dev_err(&pdev->dev, "could not register fb %d\n", i);
@@ -1643,14 +1641,14 @@ error:
 	for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
 		uninstall_fb(machine_data->fsl_diu_info[i]);
 
-	if (pool.ad.vaddr)
-		free_buf(&pdev->dev, &pool.ad,
+	if (machine_data->ad.vaddr)
+		free_buf(&pdev->dev, &machine_data->ad,
 			 sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
-	if (pool.gamma.vaddr)
-		free_buf(&pdev->dev, &pool.gamma, 768, 32);
-	if (pool.cursor.vaddr)
-		free_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
-			 32);
+	if (machine_data->gamma.vaddr)
+		free_buf(&pdev->dev, &machine_data->gamma, 768, 32);
+	if (machine_data->cursor.vaddr)
+		free_buf(&pdev->dev, &machine_data->cursor,
+			 MAX_CURS * MAX_CURS * 2, 32);
 	if (machine_data->dummy_aoi_virt)
 		fsl_diu_free(machine_data->dummy_aoi_virt, 64);
 	iounmap(machine_data->diu_reg);
@@ -1674,13 +1672,14 @@ static int fsl_diu_remove(struct platform_device *pdev)
 	free_irq_local(machine_data);
 	for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
 		uninstall_fb(machine_data->fsl_diu_info[i]);
-	if (pool.ad.vaddr)
-		free_buf(&pdev->dev, &pool.ad,
+	if (machine_data->ad.vaddr)
+		free_buf(&pdev->dev, &machine_data->ad,
 			 sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
-	if (pool.gamma.vaddr)
-		free_buf(&pdev->dev, &pool.gamma, 768, 32);
-	if (pool.cursor.vaddr)
-		free_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2, 32);
+	if (machine_data->gamma.vaddr)
+		free_buf(&pdev->dev, &machine_data->gamma, 768, 32);
+	if (machine_data->cursor.vaddr)
+		free_buf(&pdev->dev, &machine_data->cursor,
+			 MAX_CURS * MAX_CURS * 2, 32);
 	if (machine_data->dummy_aoi_virt)
 		fsl_diu_free(machine_data->dummy_aoi_virt, 64);
 	iounmap(machine_data->diu_reg);
-- 
1.7.4.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data
  2011-09-28 21:19 [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data Timur Tabi
  2011-10-05  0:36 ` Timur Tabi
@ 2011-10-05  1:28 ` Florian Tobias Schandinat
  2011-10-05  3:26 ` [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into Tabi Timur-B04825
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Tobias Schandinat @ 2011-10-05  1:28 UTC (permalink / raw)
  To: linux-fbdev

On 10/05/2011 12:36 AM, Timur Tabi wrote:
> The diu_pool structure contains diu_addr objects for various objects
> allocated in DMA space that are used by the DIU, but the only instance
> of this structure is a global variable, 'pool'.  Eliminate 'pool' by
> merging its fields into the fsl_diu_data structure, which is instantiated
> on the heap for each DIU controller found.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
>  drivers/video/fsl-diu-fb.c |   73 +++++++++++++++++++++----------------------
>  1 files changed, 36 insertions(+), 37 deletions(-)
> 
> diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
> index f9a95ab..3a5f547 100644
> --- a/drivers/video/fsl-diu-fb.c
> +++ b/drivers/video/fsl-diu-fb.c
> @@ -55,13 +55,6 @@ struct diu_addr {
>  	__u32 offset;
>  };
>  
> -struct diu_pool {
> -	struct diu_addr ad;
> -	struct diu_addr gamma;
> -	struct diu_addr pallete;
> -	struct diu_addr cursor;
> -};
> -
>  /*
>   * List of supported video modes
>   *
> @@ -348,6 +341,11 @@ struct fsl_diu_data {
>  	enum fsl_diu_monitor_port monitor_port;
>  	struct diu __iomem *diu_reg;
>  	spinlock_t reg_lock;
> +	unsigned int mode;		/* DIU operation mode */

And here you are introducing mode again....I think that you did not want to do
this, so I only took the v2 of this series and combined them with the other
patches of your old series (with the addition to the commit message in 4/9 as
you wanted). Please verify that the result in
git://github.com/schandinat/linux-2.6.git fbdev-next
is what you want to have there.


Best regards,

Florian Tobias Schandinat

> +	struct diu_addr ad;
> +	struct diu_addr gamma;
> +	struct diu_addr pallete;
> +	struct diu_addr cursor;
>  };
>  
>  enum mfb_index {
> @@ -421,8 +419,6 @@ static struct mfb_info mfb_template[] = {
>  	},
>  };
>  
> -static struct diu_pool pool;
> -
>  /**
>   * fsl_diu_name_to_port - convert a port name to a monitor port enum
>   *
> @@ -824,22 +820,23 @@ static void update_lcdc(struct fb_info *info)
>  	hw = machine_data->diu_reg;
>  
>  	diu_ops.set_monitor_port(machine_data->monitor_port);
> -	gamma_table_base = pool.gamma.vaddr;
> -	cursor_base = pool.cursor.vaddr;
> +	gamma_table_base = machine_data->gamma.vaddr;
> +	cursor_base = machine_data->cursor.vaddr;
>  	/* Prep for DIU init  - gamma table, cursor table */
>  
>  	for (i = 0; i <= 2; i++)
>  		for (j = 0; j <= 255; j++)
>  			*gamma_table_base++ = j;
>  
> -	diu_ops.set_gamma_table(machine_data->monitor_port, pool.gamma.vaddr);
> +	diu_ops.set_gamma_table(machine_data->monitor_port,
> +				machine_data->gamma.vaddr);
>  
>  	disable_lcdc(info);
>  
>  	/* Program DIU registers */
>  
> -	out_be32(&hw->gamma, pool.gamma.paddr);
> -	out_be32(&hw->cursor, pool.cursor.paddr);
> +	out_be32(&hw->gamma, machine_data->gamma.paddr);
> +	out_be32(&hw->cursor, machine_data->cursor.paddr);
>  
>  	out_be32(&hw->bgnd, 0x007F7F7F); 	/* BGND */
>  	out_be32(&hw->bgnd_wb, 0); 		/* BGND_WB */
> @@ -1560,27 +1557,27 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
>  	machine_data->monitor_port = monitor_port;
>  
>  	/* Area descriptor memory pool aligns to 64-bit boundary */
> -	if (allocate_buf(&pdev->dev, &pool.ad,
> +	if (allocate_buf(&pdev->dev, &machine_data->ad,
>  			 sizeof(struct diu_ad) * FSL_AOI_NUM, 8))
>  		return -ENOMEM;
>  
>  	/* Get memory for Gamma Table  - 32-byte aligned memory */
> -	if (allocate_buf(&pdev->dev, &pool.gamma, 768, 32)) {
> +	if (allocate_buf(&pdev->dev, &machine_data->gamma, 768, 32)) {
>  		ret = -ENOMEM;
>  		goto error;
>  	}
>  
>  	/* For performance, cursor bitmap buffer aligns to 32-byte boundary */
> -	if (allocate_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
> -			 32)) {
> +	if (allocate_buf(&pdev->dev, &machine_data->cursor,
> +			 MAX_CURS * MAX_CURS * 2, 32)) {
>  		ret = -ENOMEM;
>  		goto error;
>  	}
>  
>  	i = ARRAY_SIZE(machine_data->fsl_diu_info);
> -	machine_data->dummy_ad = (struct diu_ad *)
> -			((u32)pool.ad.vaddr + pool.ad.offset) + i;
> -	machine_data->dummy_ad->paddr = pool.ad.paddr +
> +	machine_data->dummy_ad = (struct diu_ad *)((u32)machine_data->ad.vaddr +
> +			machine_data->ad.offset) + i;
> +	machine_data->dummy_ad->paddr = machine_data->ad.paddr +
>  			i * sizeof(struct diu_ad);
>  	machine_data->dummy_aoi_virt = fsl_diu_alloc(64, &dummy_ad_addr);
>  	if (!machine_data->dummy_aoi_virt) {
> @@ -1609,9 +1606,10 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
>  	for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++) {
>  		machine_data->fsl_diu_info[i]->fix.smem_start = 0;
>  		mfbi = machine_data->fsl_diu_info[i]->par;
> -		mfbi->ad = (struct diu_ad *)((u32)pool.ad.vaddr
> -					+ pool.ad.offset) + i;
> -		mfbi->ad->paddr = pool.ad.paddr + i * sizeof(struct diu_ad);
> +		mfbi->ad = (struct diu_ad *)((u32)machine_data->ad.vaddr
> +					+ machine_data->ad.offset) + i;
> +		mfbi->ad->paddr > +			machine_data->ad.paddr + i * sizeof(struct diu_ad);
>  		ret = install_fb(machine_data->fsl_diu_info[i]);
>  		if (ret) {
>  			dev_err(&pdev->dev, "could not register fb %d\n", i);
> @@ -1643,14 +1641,14 @@ error:
>  	for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
>  		uninstall_fb(machine_data->fsl_diu_info[i]);
>  
> -	if (pool.ad.vaddr)
> -		free_buf(&pdev->dev, &pool.ad,
> +	if (machine_data->ad.vaddr)
> +		free_buf(&pdev->dev, &machine_data->ad,
>  			 sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
> -	if (pool.gamma.vaddr)
> -		free_buf(&pdev->dev, &pool.gamma, 768, 32);
> -	if (pool.cursor.vaddr)
> -		free_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2,
> -			 32);
> +	if (machine_data->gamma.vaddr)
> +		free_buf(&pdev->dev, &machine_data->gamma, 768, 32);
> +	if (machine_data->cursor.vaddr)
> +		free_buf(&pdev->dev, &machine_data->cursor,
> +			 MAX_CURS * MAX_CURS * 2, 32);
>  	if (machine_data->dummy_aoi_virt)
>  		fsl_diu_free(machine_data->dummy_aoi_virt, 64);
>  	iounmap(machine_data->diu_reg);
> @@ -1674,13 +1672,14 @@ static int fsl_diu_remove(struct platform_device *pdev)
>  	free_irq_local(machine_data);
>  	for (i = 0; i < ARRAY_SIZE(machine_data->fsl_diu_info); i++)
>  		uninstall_fb(machine_data->fsl_diu_info[i]);
> -	if (pool.ad.vaddr)
> -		free_buf(&pdev->dev, &pool.ad,
> +	if (machine_data->ad.vaddr)
> +		free_buf(&pdev->dev, &machine_data->ad,
>  			 sizeof(struct diu_ad) * FSL_AOI_NUM, 8);
> -	if (pool.gamma.vaddr)
> -		free_buf(&pdev->dev, &pool.gamma, 768, 32);
> -	if (pool.cursor.vaddr)
> -		free_buf(&pdev->dev, &pool.cursor, MAX_CURS * MAX_CURS * 2, 32);
> +	if (machine_data->gamma.vaddr)
> +		free_buf(&pdev->dev, &machine_data->gamma, 768, 32);
> +	if (machine_data->cursor.vaddr)
> +		free_buf(&pdev->dev, &machine_data->cursor,
> +			 MAX_CURS * MAX_CURS * 2, 32);
>  	if (machine_data->dummy_aoi_virt)
>  		fsl_diu_free(machine_data->dummy_aoi_virt, 64);
>  	iounmap(machine_data->diu_reg);


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into
  2011-09-28 21:19 [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data Timur Tabi
  2011-10-05  0:36 ` Timur Tabi
  2011-10-05  1:28 ` Florian Tobias Schandinat
@ 2011-10-05  3:26 ` Tabi Timur-B04825
  2 siblings, 0 replies; 4+ messages in thread
From: Tabi Timur-B04825 @ 2011-10-05  3:26 UTC (permalink / raw)
  To: linux-fbdev

Florian Tobias Schandinat wrote:

>> @@ -348,6 +341,11 @@ struct fsl_diu_data {
>>   	enum fsl_diu_monitor_port monitor_port;
>>   	struct diu __iomem *diu_reg;
>>   	spinlock_t reg_lock;
>> +	unsigned int mode;		/* DIU operation mode */
>
> And here you are introducing mode again....

I have no idea how that happened.  I never touched patch #9 during my 
rebase, and I removed that line from patch #8, so I can't explain how it 
got added back.

I spent hours verifying the patches to make sure that git-bisect still 
works and that each patch is clean.  It just never occurred to me to 
double-check a commit that I didn't modify.

> I think that you did not want to do
> this, so I only took the v2 of this series and combined them with the other
> patches of your old series (with the addition to the commit message in 4/9 as
> you wanted). Please verify that the result in
> git://github.com/schandinat/linux-2.6.git fbdev-next
> is what you want to have there.

Yes, it looks good.  Thanks for taking care of this for me.  These are the 
last patches for 3.2.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-05  3:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-28 21:19 [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into fsl_diu_data Timur Tabi
2011-10-05  0:36 ` Timur Tabi
2011-10-05  1:28 ` Florian Tobias Schandinat
2011-10-05  3:26 ` [PATCH 9/9] drivers/video: fsl-diu-fb: merge diu_pool into Tabi Timur-B04825

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).