X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fgdsys%2Fcommon%2Fosd.c;h=392d0059da8fac16dfa48b3525d8ad9885e781b3;hb=83d290c56fab2d38cd1ab4c4cc7099559c1d5046;hp=7444bee129fe21db7ed4a7b74a6516bb0dbace67;hpb=acff73fda0587b7c23989db1c324e40e16542b44;p=u-boot diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c index 7444bee129..392d0059da 100644 --- a/board/gdsys/common/osd.c +++ b/board/gdsys/common/osd.c @@ -1,8 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2010 - * Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.de - * - * SPDX-License-Identifier: GPL-2.0+ + * Dirk Eibach, Guntermann & Drunck GmbH, dirk.eibach@gdsys.cc */ #include @@ -24,8 +23,6 @@ #define SIL1178_MASTER_I2C_ADDRESS 0x38 #define SIL1178_SLAVE_I2C_ADDRESS 0x39 -#define DP501_I2C_ADDR 0x08 - #define PIXCLK_640_480_60 25180000 #define MAX_X_CHARS 53 #define MAX_Y_CHARS 26 @@ -78,14 +75,6 @@ int ics8n3qv01_i2c[] = CONFIG_SYS_ICS8N3QV01_I2C; int sil1178_i2c[] = CONFIG_SYS_SIL1178_I2C; #endif -#ifdef CONFIG_SYS_DP501_I2C -int dp501_i2c[] = CONFIG_SYS_DP501_I2C; -#endif - -#ifdef CONFIG_SYS_DP501_BASE -int dp501_base[] = CONFIG_SYS_DP501_BASE; -#endif - #ifdef CONFIG_SYS_MPC92469AC static void mpc92469ac_calc_parameters(unsigned int fout, unsigned int *post_div, unsigned int *feedback_div) @@ -317,13 +306,6 @@ int osd_probe(unsigned screen) int old_bus = i2c_get_bus_num(); bool pixclock_present = false; bool output_driver_present = false; -#ifdef CONFIG_SYS_DP501_I2C -#ifdef CONFIG_SYS_DP501_BASE - uint8_t dp501_addr = dp501_base[screen]; -#else - uint8_t dp501_addr = DP501_I2C_ADDR; -#endif -#endif OSD_GET_REG(0, version, &version); OSD_GET_REG(0, features, &features); @@ -393,11 +375,8 @@ int osd_probe(unsigned screen) #endif #ifdef CONFIG_SYS_DP501_I2C - i2c_set_bus_num(dp501_i2c[screen]); - if (!i2c_probe(dp501_addr)) { - dp501_powerup(dp501_addr); + if (!dp501_probe(screen, true)) output_driver_present = true; - } #endif if (!output_driver_present) @@ -489,6 +468,9 @@ int osd_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } for (screen = 0; screen < MAX_OSD_SCREEN; ++screen) { + if (!(osd_screen_mask & (1 << screen))) + continue; + OSD_SET_REG(screen, xy_size, ((x - 1) << 8) | (y - 1)); OSD_SET_REG(screen, x_pos, 32767 * (640 - 12 * x) / 65535); OSD_SET_REG(screen, y_pos, 32767 * (480 - 18 * y) / 65535);