mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
eARCrx: add hdmitx hpd notify [1/1]
PD#SWPL-6861 Problem: Lack hdmitx hpd event notify to eARC Solution: Add hdmitx hpd event notify to eARC in HPD interrupt handler w/o any delay. Verify: TBD Change-Id: Ic7f35365a2af634dee604f7121d62738b4b17a8d Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
This commit is contained in:
@@ -15085,4 +15085,4 @@ F: drivers/amlogic/drm/meson_vpu.c
|
||||
AMLOGIC ADD DTS FOR T312 PLATFORM
|
||||
M: hualing chen <hualing.chen@amlogic.com>
|
||||
F: arch/arm64/boot/dts/amlogic/mesontm2_t962x3_t312-panel.dtsi
|
||||
F: arch/arm/boot/dts/amlogic/mesontm2_t962x3_t312-panel.dtsi
|
||||
F: arch/arm/boot/dts/amlogic/mesontm2_t962x3_t312-panel.dtsi
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "hw_clk.h"
|
||||
#include <linux/arm-smccc.h>
|
||||
#include "checksha.h"
|
||||
#include <linux/amlogic/media/sound/hdmi_earc.h>
|
||||
|
||||
static void mode420_half_horizontal_para(void);
|
||||
static void hdmi_phy_suspend(void);
|
||||
@@ -641,6 +642,20 @@ void HDMITX_Meson_Init(struct hdmitx_dev *hdev)
|
||||
hdev->HWOp.CntlMisc(hdev, MISC_AVMUTE_OP, CLR_AVMUTE);
|
||||
}
|
||||
|
||||
static void hdmitx_phy_bandgap_en(struct hdmitx_dev *hdev)
|
||||
{
|
||||
switch (hdev->chip_type) {
|
||||
case MESON_CPU_ID_TM2:
|
||||
hd_write_reg(P_TM2_HHI_HDMI_PHY_CNTL0, 0x0b4242);
|
||||
break;
|
||||
case MESON_CPU_ID_SM1:
|
||||
hd_write_reg(P_HHI_HDMI_PHY_CNTL0, 0x0b4242);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static irqreturn_t intr_handler(int irq, void *dev)
|
||||
{
|
||||
/* get interrupt status */
|
||||
@@ -670,6 +685,8 @@ static irqreturn_t intr_handler(int irq, void *dev)
|
||||
hdev->hdmitx_event |= HDMI_TX_HPD_PLUGIN;
|
||||
hdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGOUT;
|
||||
hdev->rhpd_state = 1;
|
||||
hdmitx_phy_bandgap_en(hdev);
|
||||
earc_hdmitx_hpdst(1);
|
||||
queue_delayed_work(hdev->hdmi_wq,
|
||||
&hdev->work_hpd_plugin, HZ / 2);
|
||||
}
|
||||
@@ -678,6 +695,7 @@ static irqreturn_t intr_handler(int irq, void *dev)
|
||||
hdev->hdmitx_event |= HDMI_TX_HPD_PLUGOUT;
|
||||
hdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGIN;
|
||||
hdev->rhpd_state = 0;
|
||||
earc_hdmitx_hpdst(0);
|
||||
queue_delayed_work(hdev->hdmi_wq,
|
||||
&hdev->work_hpd_plugout, HZ / 20);
|
||||
}
|
||||
|
||||
26
include/linux/amlogic/media/sound/hdmi_earc.h
Normal file
26
include/linux/amlogic/media/sound/hdmi_earc.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* include/linux/amlogic/media/sound/hdmi_earc.h
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __HDMI_EARC_H__
|
||||
#define __HDMI_EARC_H__
|
||||
|
||||
extern void earc_hdmitx_hpdst(bool st);
|
||||
|
||||
void earc_hdmitx_hpdst(bool st)
|
||||
{
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user