mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Merge commit '46e88d6992bcc068485615445a8eed7263fde764'
* commit '46e88d6992bcc068485615445a8eed7263fde764': (23 commits) drm/rockchip: dsi2: add crtc post enable and pre disable callback drm/rockchip: vop2: set dsc config done in crtc post enable input: sensors: avoid -Wempty-body warning input: sensors: accel: dmard10: Make gsensor_reset() static ASoC: rk312x: Fix missing prototypes arm64: dts: rockchip: rk3518: Add rockchip,video-1080p-freq for cpu opp table soc: rockchip: system_monitor: Add support to limit cpu max freq when play 1080p video net: phy: Convert to use sysfs_emit_at() API drm/rockchip: dw_hdmi: Explicitly include pinctrl/consumer.h for devm_pinctrl_get net: rfkill: bt: Explicitly include pinctrl/consumer.h for pinctrl_select_state ASoC: codecs: rk_dsm: Explicitly include pinctrl/consumer.h for devm_pinctrl_get spi: rockchip-slave: Explicitly include pinctrl/consumer.h for pinctrl_pm_select_sleep_state media: rockchip: isp: Explicitly include platform_device.h regulator: rk801: Explicitly include platform_device.h soc: rockchip: decompress: Explicitly include of_platform.h for of_platform_device_create soc: rockchip: thunderboot_mmc: Explicitly include of_platform.h for of_platform_device_create soc: rockchip: thunderboot_sfc: Explicitly include of_platform.h for of_platform_device_create video: rockchip: dvbm: Explicitly include of.h for of_match_ptr clk: rockchip: Explicitly include platform_device.h ASoC: rockchip: multi-dais: Explicitly include of_platform.h for of_find_device_by_node ... Change-Id: Ifd5855a70de9fa2e18e59bad53e8a40efecfec88
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
};
|
||||
|
||||
&cpu0_opp_table {
|
||||
rockchip,video-4k-freq = <1200000>;
|
||||
rockchip,video-1080p-freq = <1200000>;
|
||||
rockchip,pvtm-voltage-sel = <
|
||||
0 1420 0
|
||||
1410 1444 1
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
struct clk;
|
||||
|
||||
|
||||
@@ -502,6 +502,7 @@ static void dw_mipi_dsi2_encoder_atomic_disable(struct drm_encoder *encoder,
|
||||
struct rockchip_crtc_state *s = to_rockchip_crtc_state(encoder->crtc->state);
|
||||
struct drm_crtc *new_crtc;
|
||||
struct drm_crtc_state *new_crtc_state = NULL;
|
||||
int output_if;
|
||||
|
||||
new_crtc = dw_mipi_dsi2_get_new_crtc(dsi2, old_state);
|
||||
if (new_crtc)
|
||||
@@ -530,6 +531,13 @@ static void dw_mipi_dsi2_encoder_atomic_disable(struct drm_encoder *encoder,
|
||||
|
||||
dw_mipi_dsi2_post_disable(dsi2);
|
||||
|
||||
if (dsi2->slave)
|
||||
output_if = VOP_OUTPUT_IF_MIPI0 | VOP_OUTPUT_IF_MIPI1;
|
||||
else
|
||||
output_if = dsi2->id ? VOP_OUTPUT_IF_MIPI1 : VOP_OUTPUT_IF_MIPI0;
|
||||
|
||||
rockchip_drm_crtc_output_pre_disable(encoder->crtc, output_if);
|
||||
|
||||
dsi2->enabled = false;
|
||||
if (dsi2->slave)
|
||||
dsi2->slave->enabled = false;
|
||||
@@ -1013,7 +1021,7 @@ static void dw_mipi_dsi2_encoder_atomic_enable(struct drm_encoder *encoder,
|
||||
struct dw_mipi_dsi2 *dsi2 = encoder_to_dsi2(encoder);
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *old_crtc_state = NULL;
|
||||
int ret;
|
||||
int output_if, ret;
|
||||
|
||||
crtc = dw_mipi_dsi2_get_new_crtc(dsi2, state);
|
||||
if (crtc)
|
||||
@@ -1050,6 +1058,13 @@ static void dw_mipi_dsi2_encoder_atomic_enable(struct drm_encoder *encoder,
|
||||
if (old_crtc_state && old_crtc_state->self_refresh_active)
|
||||
rockchip_drm_crtc_standby(encoder->crtc, 0);
|
||||
|
||||
if (dsi2->slave)
|
||||
output_if = VOP_OUTPUT_IF_MIPI0 | VOP_OUTPUT_IF_MIPI1;
|
||||
else
|
||||
output_if = dsi2->id ? VOP_OUTPUT_IF_MIPI1 : VOP_OUTPUT_IF_MIPI0;
|
||||
|
||||
rockchip_drm_crtc_output_post_enable(encoder->crtc, output_if);
|
||||
|
||||
dsi2->enabled = true;
|
||||
if (dsi2->slave)
|
||||
dsi2->slave->enabled = true;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/phy/phy.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
@@ -1073,6 +1073,7 @@ static const struct drm_bus_format_enum_list drm_bus_format_enum_list[] = {
|
||||
|
||||
static DRM_ENUM_NAME_FN(drm_get_bus_format_name, drm_bus_format_enum_list)
|
||||
|
||||
static inline void rk3588_vop2_dsc_cfg_done(struct drm_crtc *crtc);
|
||||
static inline void vop2_cfg_done(struct drm_crtc *crtc);
|
||||
static void vop2_wait_for_fs_by_done_bit_status(struct vop2_video_port *vp);
|
||||
static int vop2_clk_reset(struct reset_control *rstc);
|
||||
@@ -1260,6 +1261,7 @@ static void vop2_crtc_output_post_enable(struct drm_crtc *crtc, int intf)
|
||||
{
|
||||
struct vop2_video_port *vp = to_vop2_video_port(crtc);
|
||||
struct vop2 *vop2 = vp->vop2;
|
||||
struct rockchip_crtc_state *vcstate = to_rockchip_crtc_state(crtc->state);
|
||||
|
||||
if (intf & VOP_OUTPUT_IF_DP0)
|
||||
VOP_CTRL_SET(vop2, dp0_en, 1);
|
||||
@@ -1276,6 +1278,15 @@ static void vop2_crtc_output_post_enable(struct drm_crtc *crtc, int intf)
|
||||
if (!vp->loader_protect)
|
||||
vop2_clk_reset(vp->dclk_rst);
|
||||
|
||||
/*
|
||||
* DSC has strict constraint with timing output from VOP.
|
||||
* If vp reset dclk after DSC ready, something will be
|
||||
* wrong with DSC. To avoid this issue, it need set dsc
|
||||
* config done after dclk reset.
|
||||
*/
|
||||
if (vcstate->dsc_enable)
|
||||
rk3588_vop2_dsc_cfg_done(crtc);
|
||||
|
||||
drm_info(vop2, "vop enable intf:%x\n", intf);
|
||||
}
|
||||
|
||||
@@ -10415,8 +10426,6 @@ static void vop2_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_sta
|
||||
vop3_mcu_mode_setup(crtc);
|
||||
}
|
||||
|
||||
if (vcstate->dsc_enable)
|
||||
rk3588_vop2_dsc_cfg_done(crtc);
|
||||
drm_crtc_vblank_on(crtc);
|
||||
/*
|
||||
* restore the lut table.
|
||||
|
||||
@@ -178,7 +178,7 @@ struct sensor_axis_average {
|
||||
};
|
||||
|
||||
static struct sensor_axis_average axis_average;
|
||||
int gsensor_reset(struct i2c_client *client){
|
||||
static int gsensor_reset(struct i2c_client *client){
|
||||
char buffer[7], buffer2[2];
|
||||
/* 1. check D10 , VALUE_STADR = 0x55 , VALUE_STAINT = 0xAA */
|
||||
buffer[0] = REG_STADR;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/highmem.h>
|
||||
|
||||
@@ -961,7 +961,7 @@ static const struct spinand_manufacturer *spinand_manufacturers[] = {
|
||||
&dosilicon_spinand_manufacturer,
|
||||
#endif
|
||||
#ifdef CONFIG_MTD_SPI_NAND_ESMT
|
||||
&esmt_spinand_manufacturer,
|
||||
&esmt_c8_spinand_manufacturer,
|
||||
#endif
|
||||
#ifdef CONFIG_MTD_SPI_NAND_ETRON
|
||||
&etron_spinand_manufacturer,
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mtd/spinand.h>
|
||||
|
||||
#define SPINAND_MFR_ESMT 0xC8
|
||||
/* ESMT uses GigaDevice 0xc8 JECDEC ID on some SPI NANDs */
|
||||
#define SPINAND_MFR_ESMT_C8 0xc8
|
||||
|
||||
static SPINAND_OP_VARIANTS(read_cache_variants,
|
||||
SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0),
|
||||
@@ -111,7 +112,7 @@ static int f50l2g41ka_ecc_ecc_get_status(struct spinand_device *spinand,
|
||||
return -EBADMSG;
|
||||
}
|
||||
|
||||
static const struct spinand_info esmt_spinand_table[] = {
|
||||
static const struct spinand_info esmt_c8_spinand_table[] = {
|
||||
SPINAND_INFO("F50L1G41LB",
|
||||
SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x01),
|
||||
NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
|
||||
@@ -135,10 +136,10 @@ static const struct spinand_info esmt_spinand_table[] = {
|
||||
static const struct spinand_manufacturer_ops esmt_spinand_manuf_ops = {
|
||||
};
|
||||
|
||||
const struct spinand_manufacturer esmt_spinand_manufacturer = {
|
||||
.id = SPINAND_MFR_ESMT,
|
||||
.name = "esmt",
|
||||
.chips = esmt_spinand_table,
|
||||
.nchips = ARRAY_SIZE(esmt_spinand_table),
|
||||
const struct spinand_manufacturer esmt_c8_spinand_manufacturer = {
|
||||
.id = SPINAND_MFR_ESMT_C8,
|
||||
.name = "ESMT",
|
||||
.chips = esmt_c8_spinand_table,
|
||||
.nchips = ARRAY_SIZE(esmt_c8_spinand_table),
|
||||
.ops = &esmt_spinand_manuf_ops,
|
||||
};
|
||||
|
||||
@@ -568,12 +568,13 @@ phy_registers_show(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct phy_device *phydev = to_phy_device(dev);
|
||||
int index;
|
||||
int len = 0;
|
||||
|
||||
for (index = 0; index < 32; index++)
|
||||
sprintf(buf, "%s%2d: 0x%x\n", buf, index,
|
||||
phy_read(phydev, index));
|
||||
len += sysfs_emit_at(buf, len, "%2d: 0x%x\n", index,
|
||||
phy_read(phydev, index));
|
||||
|
||||
return strlen(buf);
|
||||
return len;
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/mfd/rk808.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/regulator/driver.h>
|
||||
#include <linux/regulator/of_regulator.h>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/soc/rockchip/rockchip_decompress.h>
|
||||
|
||||
@@ -831,6 +831,8 @@ static int monitor_device_parse_status_config(struct device_node *np,
|
||||
|
||||
ret = of_property_read_u32(np, "rockchip,early-suspend-freq",
|
||||
&info->early_suspend_freq);
|
||||
ret &= of_property_read_u32(np, "rockchip,video-1080p-freq",
|
||||
&info->video_1080p_freq);
|
||||
ret &= of_property_read_u32(np, "rockchip,video-4k-freq",
|
||||
&info->video_4k_freq);
|
||||
ret &= of_property_read_u32(np, "rockchip,reboot-freq",
|
||||
@@ -1675,9 +1677,14 @@ static void rockchip_system_status_cpu_limit_freq(struct monitor_dev_info *info,
|
||||
|
||||
if (info->early_suspend_freq && (status & SYS_STATUS_SUSPEND))
|
||||
target_freq = info->early_suspend_freq;
|
||||
|
||||
if (info->video_4k_freq && (status & SYS_STATUS_VIDEO_4K))
|
||||
target_freq = info->video_4k_freq;
|
||||
if (info->video_1080p_freq && (status & SYS_STATUS_VIDEO_1080P)) {
|
||||
if (!target_freq || target_freq > info->video_1080p_freq)
|
||||
target_freq = info->video_1080p_freq;
|
||||
}
|
||||
if (info->video_4k_freq && (status & SYS_STATUS_VIDEO_4K)) {
|
||||
if (!target_freq || target_freq > info->video_4k_freq)
|
||||
target_freq = info->video_4k_freq;
|
||||
}
|
||||
|
||||
if (target_freq == info->status_max_limit)
|
||||
return;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/soc/rockchip/rockchip_decompress.h>
|
||||
#include <linux/soc/rockchip/rockchip_thunderboot_crypto.h>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/soc/rockchip/rockchip_decompress.h>
|
||||
#include <linux/soc/rockchip/rockchip_thunderboot_crypto.h>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <soc/rockchip/rockchip_dvbm.h>
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ struct IEP_CAP {
|
||||
#if IEP_DEBUG
|
||||
#define IEP_DBG(format, args...) printk("%s: " format, DRIVER_NAME, ## args)
|
||||
#else
|
||||
#define IEP_DBG(format, args...)
|
||||
#define IEP_DBG(format, args...) no_printk("%s: " format, DRIVER_NAME, ## args)
|
||||
#endif
|
||||
|
||||
#define IEP_INFORMATION 1
|
||||
|
||||
@@ -1365,9 +1365,9 @@ static void rkvenc2_calc_timeout_thd(struct mpp_dev *mpp)
|
||||
* else use x1024 core clk cycles
|
||||
*/
|
||||
if (hw->vepu_type == RKVENC_VEPU_510)
|
||||
timeout_thd |= timeout_ms * clk_get_rate(enc->core_clk_info.clk) / 256000;
|
||||
timeout_thd |= timeout_ms * (clk_get_rate(enc->core_clk_info.clk) / 256000);
|
||||
else
|
||||
timeout_thd |= timeout_ms * clk_get_rate(enc->core_clk_info.clk) / 1024000;
|
||||
timeout_thd |= timeout_ms * (clk_get_rate(enc->core_clk_info.clk) / 1024000);
|
||||
|
||||
mpp_write(mpp, RKVENC_WDG, timeout_thd);
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ struct spinand_manufacturer {
|
||||
extern const struct spinand_manufacturer ato_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer biwin_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer dosilicon_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer esmt_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer esmt_c8_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer etron_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer fmsh_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer foresee_spinand_manufacturer;
|
||||
|
||||
@@ -270,7 +270,7 @@ extern int sensor_unregister_device(struct i2c_client *client,
|
||||
extern void sensor_shutdown(struct i2c_client *client);
|
||||
extern const struct dev_pm_ops sensor_pm_ops;
|
||||
|
||||
#define DBG(x...)
|
||||
#define DBG(x...) no_printk(x)
|
||||
|
||||
#define GSENSOR_IOCTL_MAGIC 'a'
|
||||
#define GBUFF_SIZE 12 /* Rx buffer size */
|
||||
|
||||
@@ -80,7 +80,8 @@ struct temp_opp_table {
|
||||
* @low_temp_min_volt: Minimum voltage of OPPs when low temperature, in
|
||||
* microvolt
|
||||
* @high_temp_max_volt: Maximum voltage when high temperature, in microvolt
|
||||
* @video_4k_freq: Maximum frequency when paly 4k video, in KHz
|
||||
* @video_1080p_freq: Maximum frequency when play 1080p video, in KHz
|
||||
* @video_4k_freq: Maximum frequency when play 4k video, in KHz
|
||||
* @reboot_freq: Limit maximum and minimum frequency when reboot, in KHz
|
||||
* @status_min_limit: Minimum frequency of some status frequency, in KHz
|
||||
* @status_max_limit: Minimum frequency of all status frequency, in KHz
|
||||
@@ -111,6 +112,7 @@ struct monitor_dev_info {
|
||||
unsigned long low_temp_min_volt;
|
||||
unsigned long high_temp_max_volt;
|
||||
unsigned int early_suspend_freq;
|
||||
unsigned int video_1080p_freq;
|
||||
unsigned int video_4k_freq;
|
||||
unsigned int reboot_freq;
|
||||
unsigned int status_min_limit;
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#endif
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#if 0
|
||||
#define DBG(x...) pr_info("[BT_RFKILL]: " x)
|
||||
|
||||
@@ -2409,7 +2409,7 @@ static int rk312x_platform_remove(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void rk312x_platform_shutdown(struct platform_device *pdev)
|
||||
static void rk312x_platform_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
unsigned int val = 0;
|
||||
DBG("%s\n", __func__);
|
||||
|
||||
@@ -563,4 +563,6 @@ struct rk312x_codec_pdata {
|
||||
int delay_time;
|
||||
};
|
||||
|
||||
int rk312x_codec_mute_dac(int mute);
|
||||
|
||||
#endif /* __RK312x_CODEC_H__ */
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <sound/pcm_params.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
Reference in New Issue
Block a user