1.1 --- a/pkg/devices/lib/lcd/include/lcd-jz4740.h Sat Dec 26 23:19:06 2020 +0100
1.2 +++ b/pkg/devices/lib/lcd/include/lcd-jz4740.h Sat Dec 26 23:21:46 2020 +0100
1.3 @@ -83,10 +83,6 @@
1.4 uint32_t _control_stn_frc();
1.5 uint32_t _control_transfer();
1.6
1.7 - /* OSD configure register value calculation. */
1.8 -
1.9 - uint32_t _osd_config_irq();
1.10 -
1.11 /* Command register value calculation. */
1.12
1.13 uint32_t _command_irq();
1.14 @@ -120,7 +116,7 @@
1.15
1.16 void disable();
1.17 void disable_quick();
1.18 - void enable();
1.19 + virtual void enable();
1.20 bool enabled();
1.21
1.22 /* Peripheral properties. */
2.1 --- a/pkg/devices/lib/lcd/include/lcd-jz4780.h Sat Dec 26 23:19:06 2020 +0100
2.2 +++ b/pkg/devices/lib/lcd/include/lcd-jz4780.h Sat Dec 26 23:21:46 2020 +0100
2.3 @@ -34,6 +34,10 @@
2.4 class Lcd_jz4780_chip : public Lcd_jz4740_chip
2.5 {
2.6 protected:
2.7 + /* OSD configure register value calculation. */
2.8 +
2.9 + uint32_t _osd_config_irq();
2.10 +
2.11 /* Priority level threshold value calculation. */
2.12
2.13 uint32_t _priority_transfer();
2.14 @@ -51,6 +55,8 @@
2.15 public:
2.16 Lcd_jz4780_chip(l4_addr_t addr, Jz4740_lcd_panel *panel);
2.17
2.18 + void enable();
2.19 +
2.20 /* Configuration. */
2.21
2.22 void config(struct Jz4740_lcd_descriptor *desc_vaddr,
3.1 --- a/pkg/devices/lib/lcd/src/jz4740/lcd-jz4740.cc Sat Dec 26 23:19:06 2020 +0100
3.2 +++ b/pkg/devices/lib/lcd/src/jz4740/lcd-jz4740.cc Sat Dec 26 23:21:46 2020 +0100
3.3 @@ -103,9 +103,7 @@
3.4 Lcd_jz4740_chip::enable()
3.5 {
3.6 // Clear the disable bit and set the enable bit.
3.7 - // JZ4780: OSD status set.
3.8
3.9 - _regs[Osd_status] = 0;
3.10 _regs[Lcd_status] = 0;
3.11 _regs[Lcd_control] = (_regs[Lcd_control] & ~(1U << Control_disable)) | (1U << Control_enable);
3.12 }
3.13 @@ -421,15 +419,6 @@
3.14 ((_irq_conditions & Lcd_irq_frame_end) ? (1U << Control_frame_end_irq_enable) : 0);
3.15 }
3.16
3.17 -// Return an interrupt-related OSD configuration value.
3.18 -
3.19 -uint32_t
3.20 -Lcd_jz4740_chip::_osd_config_irq()
3.21 -{
3.22 - return ((_irq_conditions & Lcd_irq_frame_start) ? (1U << Osd_config_fg0_frame_start_irq_enable) : 0) |
3.23 - ((_irq_conditions & Lcd_irq_frame_end) ? (1U << Osd_config_fg0_frame_end_irq_enable) : 0);
3.24 -}
3.25 -
3.26 // Return an interrupt-related command value.
3.27
3.28 uint32_t
4.1 --- a/pkg/devices/lib/lcd/src/jz4740/lcd-jz4780.cc Sat Dec 26 23:19:06 2020 +0100
4.2 +++ b/pkg/devices/lib/lcd/src/jz4740/lcd-jz4780.cc Sat Dec 26 23:21:46 2020 +0100
4.3 @@ -41,6 +41,22 @@
4.4 _burst_size = 64; // 64-word burst size available in the JZ4780
4.5 }
4.6
4.7 +void
4.8 +Lcd_jz4780_chip::enable()
4.9 +{
4.10 + _regs[Osd_status] = 0;
4.11 + Lcd_jz4740_chip::enable();
4.12 +}
4.13 +
4.14 +// Return an interrupt-related OSD configuration value.
4.15 +
4.16 +uint32_t
4.17 +Lcd_jz4780_chip::_osd_config_irq()
4.18 +{
4.19 + return ((_irq_conditions & Lcd_irq_frame_start) ? (1U << Osd_config_fg0_frame_start_irq_enable) : 0) |
4.20 + ((_irq_conditions & Lcd_irq_frame_end) ? (1U << Osd_config_fg0_frame_end_irq_enable) : 0);
4.21 +}
4.22 +
4.23 // Return colour depth control value.
4.24 // JZ4780 position details only.
4.25