diff mbox

[v1,2/2] fbdev: Kconfig: Add HAS_IOMEM dependency for FB_OPENCORES

Message ID 033e4a497792b2fa484c1288b9ed05c068565088.1516892845.git.alifm@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Farhan Ali Jan. 25, 2018, 3:47 p.m. UTC
The Opencores framebuffer device uses I/O memory and with
CONFIG_HAS_IOMEM disabled will lead to build errors:

ERROR: "devm_ioremap_resource" [drivers/video/fbdev/ocfb.ko] undefined!

Fix this by adding HAS_IOMEM dependency for FB_OPENCORES.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
---
 drivers/video/fbdev/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth Jan. 26, 2018, 12:33 p.m. UTC | #1
On 25.01.2018 16:47, Farhan Ali wrote:
> The Opencores framebuffer device uses I/O memory and with
> CONFIG_HAS_IOMEM disabled will lead to build errors:
> 
> ERROR: "devm_ioremap_resource" [drivers/video/fbdev/ocfb.ko] undefined!
> 
> Fix this by adding HAS_IOMEM dependency for FB_OPENCORES.
> 
> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
> ---
>  drivers/video/fbdev/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> index 5e58f5e..8667e5d 100644
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -976,7 +976,7 @@ config FB_PVR2
>  
>  config FB_OPENCORES
>  	tristate "OpenCores VGA/LCD core 2.0 framebuffer support"
> -	depends on FB && HAS_DMA
> +	depends on FB && HAS_DMA && HAS_IOMEM
>  	select FB_CFB_FILLRECT
>  	select FB_CFB_COPYAREA
>  	select FB_CFB_IMAGEBLIT

I think it would be better if fbdevs in general would depend on
HAS_IOMEM ... or could there be any frame buffer devices without IOMEM ?

 Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tomi Valkeinen Jan. 26, 2018, 12:38 p.m. UTC | #2
On 26/01/18 14:33, Thomas Huth wrote:
> On 25.01.2018 16:47, Farhan Ali wrote:
>> The Opencores framebuffer device uses I/O memory and with
>> CONFIG_HAS_IOMEM disabled will lead to build errors:
>>
>> ERROR: "devm_ioremap_resource" [drivers/video/fbdev/ocfb.ko] undefined!
>>
>> Fix this by adding HAS_IOMEM dependency for FB_OPENCORES.
>>
>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>> ---
>>  drivers/video/fbdev/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
>> index 5e58f5e..8667e5d 100644
>> --- a/drivers/video/fbdev/Kconfig
>> +++ b/drivers/video/fbdev/Kconfig
>> @@ -976,7 +976,7 @@ config FB_PVR2
>>  
>>  config FB_OPENCORES
>>  	tristate "OpenCores VGA/LCD core 2.0 framebuffer support"
>> -	depends on FB && HAS_DMA
>> +	depends on FB && HAS_DMA && HAS_IOMEM
>>  	select FB_CFB_FILLRECT
>>  	select FB_CFB_COPYAREA
>>  	select FB_CFB_IMAGEBLIT
> 
> I think it would be better if fbdevs in general would depend on
> HAS_IOMEM ... or could there be any frame buffer devices without IOMEM ?

There are some small ones which are updated with, say, i2c
(ssd1307fb.c). I think those don't need iomem.

 Tomi
Farhan Ali Jan. 26, 2018, 2:32 p.m. UTC | #3
On 01/26/2018 07:38 AM, Tomi Valkeinen wrote:
> On 26/01/18 14:33, Thomas Huth wrote:
>> On 25.01.2018 16:47, Farhan Ali wrote:
>>> The Opencores framebuffer device uses I/O memory and with
>>> CONFIG_HAS_IOMEM disabled will lead to build errors:
>>>
>>> ERROR: "devm_ioremap_resource" [drivers/video/fbdev/ocfb.ko] undefined!
>>>
>>> Fix this by adding HAS_IOMEM dependency for FB_OPENCORES.
>>>
>>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
>>> ---
>>>   drivers/video/fbdev/Kconfig | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
>>> index 5e58f5e..8667e5d 100644
>>> --- a/drivers/video/fbdev/Kconfig
>>> +++ b/drivers/video/fbdev/Kconfig
>>> @@ -976,7 +976,7 @@ config FB_PVR2
>>>   
>>>   config FB_OPENCORES
>>>   	tristate "OpenCores VGA/LCD core 2.0 framebuffer support"
>>> -	depends on FB && HAS_DMA
>>> +	depends on FB && HAS_DMA && HAS_IOMEM
>>>   	select FB_CFB_FILLRECT
>>>   	select FB_CFB_COPYAREA
>>>   	select FB_CFB_IMAGEBLIT
>>
>> I think it would be better if fbdevs in general would depend on
>> HAS_IOMEM ... or could there be any frame buffer devices without IOMEM ?
> 
> There are some small ones which are updated with, say, i2c
> (ssd1307fb.c). I think those don't need iomem.
> 
>   Tomi
> 

Most of the other framebuffer devices are fenced of by architecture 
dependency or PCI dependency. So I am hesitant to introduce a blanket 
dependency for all fbdevs.

Thank you guys for reviewing!

Thanks
Farhan

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 5e58f5e..8667e5d 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -976,7 +976,7 @@  config FB_PVR2
 
 config FB_OPENCORES
 	tristate "OpenCores VGA/LCD core 2.0 framebuffer support"
-	depends on FB && HAS_DMA
+	depends on FB && HAS_DMA && HAS_IOMEM
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT