dispc.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) dispc.c (80805774fc354f9ae7755a8e649a01dedfd0dcf8)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * linux/drivers/video/omap2/dss/dispc.c
4 *
5 * Copyright (C) 2009 Nokia Corporation
6 * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
7 *
8 * Some code and ideas taken from drivers/video/omap/ driver

--- 1621 unchanged lines hidden (view full) ---

1630 u16 orig_width, u16 orig_height,
1631 u16 out_width, u16 out_height,
1632 bool ilace, bool five_taps,
1633 bool fieldmode, enum omap_color_mode color_mode,
1634 u8 rotation)
1635{
1636 int scale_x = out_width != orig_width;
1637 int scale_y = out_height != orig_height;
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * linux/drivers/video/omap2/dss/dispc.c
4 *
5 * Copyright (C) 2009 Nokia Corporation
6 * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
7 *
8 * Some code and ideas taken from drivers/video/omap/ driver

--- 1621 unchanged lines hidden (view full) ---

1630 u16 orig_width, u16 orig_height,
1631 u16 out_width, u16 out_height,
1632 bool ilace, bool five_taps,
1633 bool fieldmode, enum omap_color_mode color_mode,
1634 u8 rotation)
1635{
1636 int scale_x = out_width != orig_width;
1637 int scale_y = out_height != orig_height;
1638 bool chroma_upscale = plane != OMAP_DSS_WB ? true : false;
1638 bool chroma_upscale = plane != OMAP_DSS_WB;
1639
1640 if (!dss_has_feature(FEAT_HANDLE_UV_SEPARATE))
1641 return;
1642 if ((color_mode != OMAP_DSS_COLOR_YUV2 &&
1643 color_mode != OMAP_DSS_COLOR_UYVY &&
1644 color_mode != OMAP_DSS_COLOR_NV12)) {
1645 /* reset chroma resampling for RGB formats */
1646 if (plane != OMAP_DSS_WB)

--- 1448 unchanged lines hidden (view full) ---

3095 return false;
3096 return true;
3097}
3098
3099static bool _dispc_mgr_pclk_ok(enum omap_channel channel,
3100 unsigned long pclk)
3101{
3102 if (dss_mgr_is_lcd(channel))
1639
1640 if (!dss_has_feature(FEAT_HANDLE_UV_SEPARATE))
1641 return;
1642 if ((color_mode != OMAP_DSS_COLOR_YUV2 &&
1643 color_mode != OMAP_DSS_COLOR_UYVY &&
1644 color_mode != OMAP_DSS_COLOR_NV12)) {
1645 /* reset chroma resampling for RGB formats */
1646 if (plane != OMAP_DSS_WB)

--- 1448 unchanged lines hidden (view full) ---

3095 return false;
3096 return true;
3097}
3098
3099static bool _dispc_mgr_pclk_ok(enum omap_channel channel,
3100 unsigned long pclk)
3101{
3102 if (dss_mgr_is_lcd(channel))
3103 return pclk <= dispc.feat->max_lcd_pclk ? true : false;
3103 return pclk <= dispc.feat->max_lcd_pclk;
3104 else
3104 else
3105 return pclk <= dispc.feat->max_tv_pclk ? true : false;
3105 return pclk <= dispc.feat->max_tv_pclk;
3106}
3107
3108bool dispc_mgr_timings_ok(enum omap_channel channel,
3109 const struct omap_video_timings *timings)
3110{
3111 if (!_dispc_mgr_size_ok(timings->x_res, timings->y_res))
3112 return false;
3113

--- 1093 unchanged lines hidden ---
3106}
3107
3108bool dispc_mgr_timings_ok(enum omap_channel channel,
3109 const struct omap_video_timings *timings)
3110{
3111 if (!_dispc_mgr_size_ok(timings->x_res, timings->y_res))
3112 return false;
3113

--- 1093 unchanged lines hidden ---