video: ipuv3: remove some useless code to reduce binary size
Subsystems (2)
PATCH 1/1 video: ipuv3: remove some useless code to reduce binary size
To enable DM_VIDEO we must decrease binary size to fix build breakage for some boards, so drop not needed code. Also add !DM_VIDEO guards which can be later removed when last non DM users will be converted.
--- drivers/video/imx/ipu_disp.c | 12 ------- drivers/video/imx/mxc_ipuv3_fb.c | 57 ++++++++++++-------------------- 2 files changed, 22 insertions(+), 47 deletions(-)
drivers/video/imx/ipu_disp.c +0 -12
@@ -1191,9 +1191,6 @@ int32_t ipu_disp_set_global_alpha(ipu_channel_t channel, unsigned char enable,else bg_chan =0 ; -if (!g_ipu_clk_enabled) -clk_enable (g_ipu_clk); -if (bg_chan) { reg =__raw_readl (DP_COM_CONF ());__raw_writel (reg & ~DP_COM_CONF_GWSEL ,DP_COM_CONF ());
@@ -1217,9 +1214,6 @@ int32_t ipu_disp_set_global_alpha(ipu_channel_t channel, unsigned char enable, reg =__raw_readl (IPU_SRM_PRI2 ) |0x8 ;__raw_writel (reg,IPU_SRM_PRI2 ); -if (!g_ipu_clk_enabled) -clk_disable (g_ipu_clk); -return 0 ; }
@@ -1246,9 +1240,6 @@ int32_t ipu_disp_set_color_key(ipu_channel_t channel, unsigned char enable, (channel == MEM_BG_ASYNC1 || channel == MEM_FG_ASYNC1)))return -EINVAL ; -if (!g_ipu_clk_enabled) -clk_enable (g_ipu_clk); - color_key_4rgb =1 ;/* Transform color key from rgb to yuv if CSC is enabled */ if (((fg_csc_type == RGB2YUV) && (bg_csc_type == YUV2YUV)) ||
@@ -1286,8 +1277,5 @@ int32_t ipu_disp_set_color_key(ipu_channel_t channel, unsigned char enable, reg =__raw_readl (IPU_SRM_PRI2 ) |0x8 ;__raw_writel (reg,IPU_SRM_PRI2 ); -if (!g_ipu_clk_enabled) -clk_disable (g_ipu_clk); -return 0 ; }
drivers/video/imx/mxc_ipuv3_fb.c +22 -35
149 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 1/1 video: ipuv3: remove some useless code to reduce binary size
Quoted 6 lines · Anatolij Gustschin
To enable
DM_VIDEOwe must decrease binary size to fix build breakage for some boards, so drop not needed code. Also add !DM_VIDEO guards which can be later removed when last non DM users will be converted.Signed-off-by Anatolij Gustschin <[email protected]>
Given that the migration deadline for non-DM video boards was the v2019.07 release, what's the case for not:
1. Perform the changes here, to save size.
2. Enable conversions that can now be enabled.
3. Disable video/drop platforms on unconverted boards.
4. Drop non-DM code here.
Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200525/5bab5406/attachment.sig>
PATCH 1/1 video: ipuv3: remove some useless code to reduce binary size
Quoted 7 lines · On Mon, 25 May 2020 12:05:14 -0400 Tom Rini trini at konsulko.com wrote:
Quoted 5 lines · Anatolij Gustschin
To enable
DM_VIDEOwe must decrease binary size to fix build breakage for some boards, so drop not needed code. Also add !DM_VIDEO guards which can be later removed when last non DM users will be converted.
Quoted 5 lines
Quoted 1 line
Signed-off-by Anatolij Gustschin <[email protected]>Given that the migration deadline for non-DM video boards was the v2019.07 release, what's the case for not:
1. Perform the changes here, to save size.
I've submitted more patches to save size, changes here were not enough to fix building tbs2910 board with DM video enabled.
Quoted 1 line
2. Enable conversions that can now be enabled.
All boards using ipuv3 driver are now converted, I'll submit a pull request to merge the changes.
Quoted 1 line
3. Disable video/drop platforms on unconverted boards.
For boards with only DM video conversion missing, it makes sense to disable video, but I don't know is this can be done for all such boards (some do not have serial console and rely on working display output). Some boards do not even enable DM, these are candidates to drop.
Quoted 1 line
4. Drop non-DM code here.
Patch already submitted to drop non-DM code here.
--
Anatolij
PATCH 1/1 video: ipuv3: remove some useless code to reduce binary size
Quoted 10 lines · Anatolij Gustschin
Quoted 7 lines · On Mon, 25 May 2020 12:05:14 -0400 Tom Rini trini at konsulko.com wrote:
Quoted 5 lines · Anatolij Gustschin
To enable
DM_VIDEOwe must decrease binary size to fix build breakage for some boards, so drop not needed code. Also add !DM_VIDEO guards which can be later removed when last non DM users will be converted.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Anatolij Gustschin <[email protected]>Given that the migration deadline for non-DM video boards was the v2019.07 release, what's the case for not:
1. Perform the changes here, to save size.I've submitted more patches to save size, changes here were not enough to fix building tbs2910 board with DM video enabled.
Thanks a lot for doing all of this.
Quoted 4 lines
Quoted 1 line
2. Enable conversions that can now be enabled.
All boards using ipuv3 driver are now converted, I'll submit a pull request to merge the changes.
OK, I'll take it for -next so you can wait a bit more or I'll queue it up for when I open -next.
Quoted 7 lines
Quoted 1 line
3. Disable video/drop platforms on unconverted boards.
For boards with only DM video conversion missing, it makes sense to disable video, but I don't know is this can be done for all such boards (some do not have serial console and rely on working display output). Some boards do not even enable DM, these are candidates to drop.
It's a tough call. I think just disabling video support, and CC'ing the maintainer is fine. That should cause one of:
- Maintainer says they'll get to converting, does so.
- Maintainer says they don't want to maintain the platform anymore (see mx23evk for example).
- Maintainer email bounces.
In the latter case we can (or rather, let me know, I will..) do a removal patch.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200526/26d31bef/attachment.sig>
PATCH 1/1 video: ipuv3: remove some useless code to reduce binary size
In reply to Anatolij GustschinQuoted 10 lines · On Mon, 25 May 2020 14:34:17 +0200 Anatolij Gustschin agust at denx.de wrote:
To enable
DM_VIDEOwe must decrease binary size to fix build breakage for some boards, so drop not needed code. Also add !DM_VIDEO guards which can be later removed when last non DM users will be converted.Signed-off-by Anatolij Gustschin <[email protected]>--- drivers/video/imx/ipu_disp.c | 12 ------- drivers/video/imx/mxc_ipuv3_fb.c | 57 ++++++++++++-------------------- 2 files changed, 22 insertions(+), 47 deletions(-)
Applied to u-boot-video/next, thanks!
--
Anatolij