2.1 --- a/pkg/devices/lib/lcd/include/lcd-jz4740.h Sat Dec 26 00:55:32 2020 +0100
2.2 +++ b/pkg/devices/lib/lcd/include/lcd-jz4740.h Sat Dec 26 23:44:23 2020 +0100
2.3 @@ -83,10 +83,6 @@
2.4 uint32_t _control_stn_frc();
2.5 uint32_t _control_transfer();
2.6
2.7 - /* OSD configure register value calculation. */
2.8 -
2.9 - uint32_t _osd_config_irq();
2.10 -
2.11 /* Command register value calculation. */
2.12
2.13 uint32_t _command_irq();
2.14 @@ -120,7 +116,7 @@
2.15
2.16 void disable();
2.17 void disable_quick();
2.18 - void enable();
2.19 + virtual void enable();
2.20 bool enabled();
2.21
2.22 /* Peripheral properties. */
3.1 --- a/pkg/devices/lib/lcd/include/lcd-jz4780.h Sat Dec 26 00:55:32 2020 +0100
3.2 +++ b/pkg/devices/lib/lcd/include/lcd-jz4780.h Sat Dec 26 23:44:23 2020 +0100
3.3 @@ -34,6 +34,10 @@
3.4 class Lcd_jz4780_chip : public Lcd_jz4740_chip
3.5 {
3.6 protected:
3.7 + /* OSD configure register value calculation. */
3.8 +
3.9 + uint32_t _osd_config_irq();
3.10 +
3.11 /* Priority level threshold value calculation. */
3.12
3.13 uint32_t _priority_transfer();
3.14 @@ -51,6 +55,8 @@
3.15 public:
3.16 Lcd_jz4780_chip(l4_addr_t addr, Jz4740_lcd_panel *panel);
3.17
3.18 + void enable();
3.19 +
3.20 /* Configuration. */
3.21
3.22 void config(struct Jz4740_lcd_descriptor *desc_vaddr,
4.1 --- a/pkg/devices/lib/lcd/src/jz4740/lcd-jz4740.cc Sat Dec 26 00:55:32 2020 +0100
4.2 +++ b/pkg/devices/lib/lcd/src/jz4740/lcd-jz4740.cc Sat Dec 26 23:44:23 2020 +0100
4.3 @@ -103,9 +103,7 @@
4.4 Lcd_jz4740_chip::enable()
4.5 {
4.6 // Clear the disable bit and set the enable bit.
4.7 - // JZ4780: OSD status set.
4.8
4.9 - _regs[Osd_status] = 0;
4.10 _regs[Lcd_status] = 0;
4.11 _regs[Lcd_control] = (_regs[Lcd_control] & ~(1U << Control_disable)) | (1U << Control_enable);
4.12 }
4.13 @@ -421,15 +419,6 @@
4.14 ((_irq_conditions & Lcd_irq_frame_end) ? (1U << Control_frame_end_irq_enable) : 0);
4.15 }
4.16
4.17 -// Return an interrupt-related OSD configuration value.
4.18 -
4.19 -uint32_t
4.20 -Lcd_jz4740_chip::_osd_config_irq()
4.21 -{
4.22 - return ((_irq_conditions & Lcd_irq_frame_start) ? (1U << Osd_config_fg0_frame_start_irq_enable) : 0) |
4.23 - ((_irq_conditions & Lcd_irq_frame_end) ? (1U << Osd_config_fg0_frame_end_irq_enable) : 0);
4.24 -}
4.25 -
4.26 // Return an interrupt-related command value.
4.27
4.28 uint32_t
5.1 --- a/pkg/devices/lib/lcd/src/jz4740/lcd-jz4780.cc Sat Dec 26 00:55:32 2020 +0100
5.2 +++ b/pkg/devices/lib/lcd/src/jz4740/lcd-jz4780.cc Sat Dec 26 23:44:23 2020 +0100
5.3 @@ -41,6 +41,22 @@
5.4 _burst_size = 64; // 64-word burst size available in the JZ4780
5.5 }
5.6
5.7 +void
5.8 +Lcd_jz4780_chip::enable()
5.9 +{
5.10 + _regs[Osd_status] = 0;
5.11 + Lcd_jz4740_chip::enable();
5.12 +}
5.13 +
5.14 +// Return an interrupt-related OSD configuration value.
5.15 +
5.16 +uint32_t
5.17 +Lcd_jz4780_chip::_osd_config_irq()
5.18 +{
5.19 + return ((_irq_conditions & Lcd_irq_frame_start) ? (1U << Osd_config_fg0_frame_start_irq_enable) : 0) |
5.20 + ((_irq_conditions & Lcd_irq_frame_end) ? (1U << Osd_config_fg0_frame_end_irq_enable) : 0);
5.21 +}
5.22 +
5.23 // Return colour depth control value.
5.24 // JZ4780 position details only.
5.25