summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--arch/arm64/boot/dts/amlogic/gxl_p241_1g.dts8
-rw-r--r--arch/arm64/boot/dts/amlogic/gxl_p241_v2-1g.dts8
-rw-r--r--arch/arm64/kernel/topology.c8
-rw-r--r--drivers/amlogic/media/video_processor/ionvideo/ionvideo.c23
-rw-r--r--drivers/amlogic/media/video_processor/ionvideo/ionvideo.h1
-rw-r--r--drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c2
-rw-r--r--drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c2
-rw-r--r--drivers/tty/serial/serial_core.c4
-rw-r--r--drivers/tty/tty_io.c10
-rw-r--r--drivers/tty/tty_ldisc.c4
-rw-r--r--fs/sdcardfs/inode.c4
-rw-r--r--include/linux/tty.h2
-rw-r--r--sound/soc/amlogic/meson/audio_hw.c21
-rw-r--r--sound/soc/amlogic/meson/audio_hw.h6
-rw-r--r--sound/soc/amlogic/meson/meson.c11
-rw-r--r--sound/soc/amlogic/meson/spdif_dai.c9
16 files changed, 93 insertions, 30 deletions
diff --git a/arch/arm64/boot/dts/amlogic/gxl_p241_1g.dts b/arch/arm64/boot/dts/amlogic/gxl_p241_1g.dts
index 4b908c0..82fad61 100644
--- a/arch/arm64/boot/dts/amlogic/gxl_p241_1g.dts
+++ b/arch/arm64/boot/dts/amlogic/gxl_p241_1g.dts
@@ -50,6 +50,14 @@
#size-cells = <2>;
ranges;
/* global autoconfigured region for contiguous allocations */
+ ramoops@0x07400000 {
+ compatible = "ramoops";
+ reg = <0x0 0x07400000 0x0 0x00100000>;
+ record-size = <0x8000>;
+ console-size = <0x8000>;
+ ftrace-size = <0x0>;
+ pmsg-size = <0x8000>;
+ };
secmon_reserved:linux,secmon {
compatible = "shared-dma-pool";
reusable;
diff --git a/arch/arm64/boot/dts/amlogic/gxl_p241_v2-1g.dts b/arch/arm64/boot/dts/amlogic/gxl_p241_v2-1g.dts
index a89b1d4..c3ad233 100644
--- a/arch/arm64/boot/dts/amlogic/gxl_p241_v2-1g.dts
+++ b/arch/arm64/boot/dts/amlogic/gxl_p241_v2-1g.dts
@@ -50,6 +50,14 @@
#size-cells = <2>;
ranges;
/* global autoconfigured region for contiguous allocations */
+ ramoops@0x07400000 {
+ compatible = "ramoops";
+ reg = <0x0 0x07400000 0x0 0x00100000>;
+ record-size = <0x8000>;
+ console-size = <0x8000>;
+ ftrace-size = <0x0>;
+ pmsg-size = <0x8000>;
+ };
secmon_reserved:linux,secmon {
compatible = "shared-dma-pool";
reusable;
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
index 7758f7f..8bede6c 100644
--- a/arch/arm64/kernel/topology.c
+++ b/arch/arm64/kernel/topology.c
@@ -233,7 +233,11 @@ const struct sched_group_energy * const cpu_cluster_energy(int cpu)
struct sched_group_energy *sge = sge_array[cpu][SD_LEVEL1];
if (!sge) {
+#ifdef CONFIG_AMLOGIC_MODIFY
+ pr_debug("Invalid sched_group_energy for Cluster%d\n", cpu);
+#else
pr_warn("Invalid sched_group_energy for Cluster%d\n", cpu);
+#endif
return NULL;
}
@@ -246,7 +250,11 @@ const struct sched_group_energy * const cpu_core_energy(int cpu)
struct sched_group_energy *sge = sge_array[cpu][SD_LEVEL0];
if (!sge) {
+#ifdef CONFIG_AMLOGIC_MODIFY
+ pr_debug("Invalid sched_group_energy for Cluster%d\n", cpu);
+#else
pr_warn("Invalid sched_group_energy for CPU%d\n", cpu);
+#endif
return NULL;
}
diff --git a/drivers/amlogic/media/video_processor/ionvideo/ionvideo.c b/drivers/amlogic/media/video_processor/ionvideo/ionvideo.c
index 9005473..1b5978b 100644
--- a/drivers/amlogic/media/video_processor/ionvideo/ionvideo.c
+++ b/drivers/amlogic/media/video_processor/ionvideo/ionvideo.c
@@ -310,12 +310,14 @@ static int ionvideo_fillbuff(struct ionvideo_dev *dev,
vf_put(vf, dev->vf_receiver_name);
return ret;
}
+ if (dev->wait_ge2d_timeout) {
+ IONVID_INFO("ppmgr2_process timeout\n");
+ dev->wait_ge2d_timeout = false;
+ return -EAGAIN;
+ }
+ dev->wait_ge2d_timeout = false;
videoc_omx_compute_pts(dev, vf);
buf->timecode.frames = 0;
- if (vf->flag & VFRAME_FLAG_ERROR_RECOVERY)
- buf->timecode.frames |= 1;
- if (vf->flag & VFRAME_FLAG_SYNCFRAME)
- buf->timecode.frames |= 2;
vf_put(vf, dev->vf_receiver_name);
buf->timestamp.tv_sec = dev->pts >> 32;
buf->timestamp.tv_usec = dev->pts & 0xFFFFFFFF;
@@ -361,6 +363,7 @@ static void ionvideo_thread_tick(struct ionvideo_dev *dev)
if (dev->active_state == ION_INACTIVE)
return;
+ dev->wait_ge2d_timeout = false;
vf = vf_peek(dev->vf_receiver_name);
if (!vf) {
dev->vf_wait_cnt++;
@@ -920,15 +923,21 @@ static int ionvideo_v4l2_release(void)
static int video_receiver_event_fun(int type, void *data, void *private_data)
{
struct ionvideo_dev *dev = (struct ionvideo_dev *)private_data;
-
+ int timeout = 0;
if (type == VFRAME_EVENT_PROVIDER_UNREG) {
dev->receiver_register = 0;
dev->is_omx_video_started = 0;
if (dev->active_state == ION_ACTIVE) {
/*if player killed thread may have exit.*/
dev->active_state = ION_INACTIVE_REQ;
- wait_for_completion_timeout(&dev->inactive_done,
- msecs_to_jiffies(100));
+ dev->wait_ge2d_timeout = false;
+ timeout = wait_for_completion_timeout(
+ &dev->inactive_done,
+ msecs_to_jiffies(200));
+ if (!timeout) {
+ IONVID_INFO("unreg:wait timeout\n");
+ dev->wait_ge2d_timeout = true;
+ }
}
/*tsync_avevent(VIDEO_STOP, 0);*/
diff --git a/drivers/amlogic/media/video_processor/ionvideo/ionvideo.h b/drivers/amlogic/media/video_processor/ionvideo/ionvideo.h
index 14bb5f9..8ab646b 100644
--- a/drivers/amlogic/media/video_processor/ionvideo/ionvideo.h
+++ b/drivers/amlogic/media/video_processor/ionvideo/ionvideo.h
@@ -302,6 +302,7 @@ struct ionvideo_dev {
struct mutex mutex_input;
struct mutex mutex_output;
struct v4l2_buffer ionvideo_input[IONVIDEO_POOL_SIZE + 1];
+ bool wait_ge2d_timeout;
};
unsigned int get_ionvideo_debug(void);
diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c
index d791870..1708c1a 100644
--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c
+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c
@@ -2744,7 +2744,7 @@ static void hdmitx_hpd_plugin_handler(struct work_struct *work)
hdmitx_notify_hpd(hdev->hpd_state);
extcon_set_state_sync(hdmitx_extcon_hdmi, EXTCON_DISP_HDMI, 1);
-
+ extcon_set_state_sync(hdmitx_excton_audio, EXTCON_DISP_HDMI, 1);
mutex_unlock(&setclk_mutex);
}
diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c
index bdc0d6b..c24b007 100644
--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c
+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c
@@ -646,8 +646,6 @@ static irqreturn_t intr_handler(int irq, void *dev)
}
/* HPD rising */
if (data32 & (1 << 1)) {
- queue_delayed_work(hdev->hdmi_wq,
- &hdev->work_aud_hpd_plug, HZ / 2);
hdev->hdmitx_event |= HDMI_TX_HPD_PLUGIN;
hdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGOUT;
queue_delayed_work(hdev->hdmi_wq,
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 2e2b88a..839cee4 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -968,6 +968,8 @@ static int uart_set_info(struct tty_struct *tty, struct tty_port *port,
}
} else {
retval = uart_startup(tty, state, 1);
+ if (retval == 0)
+ tty_port_set_initialized(port, true);
if (retval > 0)
retval = 0;
}
@@ -1136,6 +1138,8 @@ static int uart_do_autoconfig(struct tty_struct *tty,struct uart_state *state)
uport->ops->config_port(uport, flags);
ret = uart_startup(tty, state, 1);
+ if (ret == 0)
+ tty_port_set_initialized(port, true);
if (ret > 0)
ret = 0;
}
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 734a635..fb9bada 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1543,6 +1543,9 @@ struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
"%s: %s driver does not set tty->port. This will crash the kernel later. Fix the driver!\n",
__func__, tty->driver->name);
+ retval = tty_ldisc_lock(tty, 5 * HZ);
+ if (retval)
+ goto err_release_lock;
tty->port->itty = tty;
/*
@@ -1553,6 +1556,7 @@ struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
retval = tty_ldisc_setup(tty, tty->link);
if (retval)
goto err_release_tty;
+ tty_ldisc_unlock(tty);
/* Return the tty locked so that it cannot vanish under the caller */
return tty;
@@ -1565,9 +1569,11 @@ err_module_put:
/* call the tty release_tty routine to clean out this slot */
err_release_tty:
- tty_unlock(tty);
+ tty_ldisc_unlock(tty);
tty_info_ratelimited(tty, "ldisc open failed (%d), clearing slot %d\n",
retval, idx);
+err_release_lock:
+ tty_unlock(tty);
release_tty(tty, idx);
return ERR_PTR(retval);
}
@@ -1696,6 +1702,8 @@ static void release_tty(struct tty_struct *tty, int idx)
if (tty->link)
tty->link->port->itty = NULL;
tty_buffer_cancel_work(tty->port);
+ if (tty->link)
+ tty_buffer_cancel_work(tty->link->port);
tty_kref_put(tty->link);
tty_kref_put(tty);
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index 68947f6..9f0b062 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -333,7 +333,7 @@ static inline void __tty_ldisc_unlock(struct tty_struct *tty)
ldsem_up_write(&tty->ldisc_sem);
}
-static int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
+int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
{
int ret;
@@ -344,7 +344,7 @@ static int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
return 0;
}
-static void tty_ldisc_unlock(struct tty_struct *tty)
+void tty_ldisc_unlock(struct tty_struct *tty)
{
clear_bit(TTY_LDISC_HALTED, &tty->flags);
__tty_ldisc_unlock(tty);
diff --git a/fs/sdcardfs/inode.c b/fs/sdcardfs/inode.c
index 4a971e2..14ba53f 100644
--- a/fs/sdcardfs/inode.c
+++ b/fs/sdcardfs/inode.c
@@ -600,7 +600,11 @@ static const char *sdcardfs_follow_link(struct dentry *dentry, void **cookie)
static int sdcardfs_permission_wrn(struct inode *inode, int mask)
{
+#ifdef CONFIG_AMLOGIC_MODIFY
+ WARN_ONCE(1, "sdcardfs does not support permission. Use permission2.\n");
+#else
WARN_RATELIMIT(1, "sdcardfs does not support permission. Use permission2.\n");
+#endif
return -EINVAL;
}
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 40144f3..a41244f 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -394,6 +394,8 @@ extern struct tty_struct *get_current_tty(void);
/* tty_io.c */
extern int __init tty_init(void);
extern const char *tty_name(const struct tty_struct *tty);
+extern int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout);
+extern void tty_ldisc_unlock(struct tty_struct *tty);
#else
static inline void console_init(void)
{ }
diff --git a/sound/soc/amlogic/meson/audio_hw.c b/sound/soc/amlogic/meson/audio_hw.c
index 4a442e6..3c855ba 100644
--- a/sound/soc/amlogic/meson/audio_hw.c
+++ b/sound/soc/amlogic/meson/audio_hw.c
@@ -168,20 +168,19 @@ void audio_set_aiubuf(u32 addr, u32 size, unsigned int channel)
void audio_set_958outbuf(u32 addr, u32 size, int flag)
{
+#ifdef CONFIG_AMLOGIC_SND_SPLIT_MODE
+ aml_write_cbus(AIU_MEM_IEC958_START_PTR, addr & 0xffffff00);
+ aml_write_cbus(AIU_MEM_IEC958_RD_PTR, addr & 0xffffff00);
+#else
aml_write_cbus(AIU_MEM_IEC958_START_PTR, addr & 0xffffffc0);
- if (aml_read_cbus(AIU_MEM_IEC958_START_PTR) ==
- aml_read_cbus(AIU_MEM_I2S_START_PTR)) {
- aml_write_cbus(AIU_MEM_IEC958_RD_PTR,
- aml_read_cbus(AIU_MEM_I2S_RD_PTR));
- } else
- aml_write_cbus(AIU_MEM_IEC958_RD_PTR,
- addr & 0xffffffc0);
+ aml_write_cbus(AIU_MEM_IEC958_RD_PTR, addr & 0xffffffc0);
+#endif
if (flag == 0) {
/* this is for 16bit 2 channel */
#ifdef CONFIG_AMLOGIC_SND_SPLIT_MODE
aml_write_cbus(AIU_MEM_IEC958_END_PTR,
- (addr & 0xffffffc0) +
- (size & 0xffffffc0) - 8);
+ (addr & 0xffffff00) +
+ (size & 0xffffff00) - 256);
#else
aml_write_cbus(AIU_MEM_IEC958_END_PTR,
(addr & 0xffffffc0) +
@@ -191,8 +190,8 @@ void audio_set_958outbuf(u32 addr, u32 size, int flag)
/* this is for RAW mode */
#ifdef CONFIG_AMLOGIC_SND_SPLIT_MODE
aml_write_cbus(AIU_MEM_IEC958_END_PTR,
- (addr & 0xffffffc0) +
- (size & 0xffffffc0) - 8);
+ (addr & 0xffffff00) +
+ (size & 0xffffff00) - 256);
#else
aml_write_cbus(AIU_MEM_IEC958_END_PTR,
(addr & 0xffffffc0) +
diff --git a/sound/soc/amlogic/meson/audio_hw.h b/sound/soc/amlogic/meson/audio_hw.h
index dc0397c..a95826b 100644
--- a/sound/soc/amlogic/meson/audio_hw.h
+++ b/sound/soc/amlogic/meson/audio_hw.h
@@ -111,6 +111,12 @@ enum {
#define AUDIO_ALGOUT_DAC_FORMAT_DSP 0
#define AUDIO_ALGOUT_DAC_FORMAT_LEFT_JUSTIFY 1
+#ifdef CONFIG_AMLOGIC_SND_SPLIT_MODE
+#define DEFAULT_PLAYBACK_SIZE 256
+#else
+#define DEFAULT_PLAYBACK_SIZE 64
+#endif
+
extern unsigned int IEC958_MODE;
extern unsigned int I2S_MODE;
extern unsigned int audio_in_source;
diff --git a/sound/soc/amlogic/meson/meson.c b/sound/soc/amlogic/meson/meson.c
index f011369..80faed7 100644
--- a/sound/soc/amlogic/meson/meson.c
+++ b/sound/soc/amlogic/meson/meson.c
@@ -54,17 +54,22 @@
#define DRV_NAME "aml_meson_snd_card"
-static int i2sbuf[32 + 16];
+static int i2sbuf[DEFAULT_PLAYBACK_SIZE];
static void aml_i2s_play(void)
{
- audio_util_set_dac_i2s_format(AUDIO_ALGOUT_DAC_FORMAT_DSP);
+ int size = DEFAULT_PLAYBACK_SIZE;
+
+ audio_util_set_dac_i2s_format(AUDIO_ALGOUT_DAC_FORMAT_DSP);
#ifdef CONFIG_AMLOGIC_SND_SPLIT_MODE
audio_set_i2s_mode(AIU_I2S_MODE_PCM16, 2);
#else
audio_set_i2s_mode(AIU_I2S_MODE_PCM16);
#endif
memset(i2sbuf, 0, sizeof(i2sbuf));
- audio_set_aiubuf((virt_to_phys(i2sbuf) + 63) & (~63), 128, 2);
+ audio_set_aiubuf((virt_to_phys(i2sbuf)
+ + (DEFAULT_PLAYBACK_SIZE - 1))
+ & (~(DEFAULT_PLAYBACK_SIZE - 1)),
+ size, 2);
audio_out_i2s_enable(1);
}
diff --git a/sound/soc/amlogic/meson/spdif_dai.c b/sound/soc/amlogic/meson/spdif_dai.c
index 080eea3..84302ae 100644
--- a/sound/soc/amlogic/meson/spdif_dai.c
+++ b/sound/soc/amlogic/meson/spdif_dai.c
@@ -99,11 +99,12 @@ void aml_spdif_play(int samesrc)
{
if (!is_meson_tv_chipset()) {
uint div = 0;
- static int iec958buf[32 + 16];
+ static int iec958buf[DEFAULT_PLAYBACK_SIZE];
struct _aiu_958_raw_setting_t set;
struct _aiu_958_channel_status_t chstat;
struct snd_pcm_substream substream;
struct snd_pcm_runtime runtime;
+ int size = DEFAULT_PLAYBACK_SIZE;
substream.runtime = &runtime;
runtime.rate = 48000;
@@ -143,8 +144,10 @@ void aml_spdif_play(int samesrc)
/*clear the same source function as new raw data output */
audio_i2s_958_same_source(samesrc);
memset(iec958buf, 0, sizeof(iec958buf));
- audio_set_958outbuf((virt_to_phys(iec958buf) + 63) & (~63),
- 128, 0);
+ audio_set_958outbuf((virt_to_phys(iec958buf)
+ + (DEFAULT_PLAYBACK_SIZE - 1))
+ & (~(DEFAULT_PLAYBACK_SIZE - 1)),
+ size, 0);
audio_set_958_mode(AIU_958_MODE_PCM16, &set);
aout_notifier_call_chain(AOUT_EVENT_IEC_60958_PCM, &substream);
audio_hw_958_enable(1);