replace common qcom sources with samsung ones

This commit is contained in:
SaschaNes
2025-08-12 22:13:00 +02:00
parent ba24dcded9
commit 6f7753de11
5682 changed files with 2450203 additions and 103634 deletions

View File

@@ -3,4 +3,7 @@
header-y += msm_hdcp.h
header-y += sde_io_util.h
header-y += sde_rsc.h
header-y += sec_displayport.h
header-y += secdp_bigdata.h
header-y += secdp_logger.h

View File

@@ -0,0 +1,33 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2017-2021, The Linux Foundation. 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 version 2 and
* only version 2 as published by the Free Software Foundation.
*
* 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 __SEC_DISPLAYPORT_H
#define __SEC_DISPLAYPORT_H
/*
* this function waits for completion of dp disconnection.
* return : zero if dp resource is released completely.
* non-zero if waiting timeout happens.
*/
int secdp_wait_for_disconnect_complete(void);
/**
* if SSUSB gets reset, it need to call this callback to let DP know, since
* DP shares PHY with SSUSB (combo PHY)
* return 0 if success
* return -1 otherwise
*/
int secdp_pdic_reset_cb(bool reset);
#endif/*__SEC_DISPLAYPORT_H*/

View File

@@ -0,0 +1,61 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2017-2021, The Linux Foundation. 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 version 2 and
* only version 2 as published by the Free Software Foundation.
*
* 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 DISPLAYPORT_BIGDATA_H
#define DISPLAYPORT_BIGDATA_H
#include <linux/platform_device.h>
#include <linux/stdarg.h>
enum DP_BD_ITEM_LIST {
ERR_AUX,
ERR_EDID,
ERR_HDCP_AUTH,
ERR_LINK_TRAIN,
ERR_INF_IRQHPD,
BD_LINK_CONFIGURE,
BD_ADAPTER_HWID,
BD_ADAPTER_FWVER,
BD_ADAPTER_TYPE,
BD_MAX_LANE_COUNT,
BD_MAX_LINK_RATE,
BD_CUR_LANE_COUNT,
BD_CUR_LINK_RATE,
BD_HDCP_VER,
BD_ORIENTATION,
BD_RESOLUTION,
BD_EDID,
BD_ADT_VID,
BD_ADT_PID,
BD_DP_MODE,
BD_SINK_NAME,
BD_AUD_CH,
BD_AUD_FREQ,
BD_AUD_BIT,
BD_ITEM_MAX,
};
void secdp_bigdata_save_item(enum DP_BD_ITEM_LIST item, ...);
void secdp_bigdata_inc_error_cnt(enum DP_BD_ITEM_LIST err);
void secdp_bigdata_clr_error_cnt(enum DP_BD_ITEM_LIST err);
void secdp_bigdata_connection(void);
void secdp_bigdata_disconnection(void);
void secdp_bigdata_init(struct class *dp_class);
ssize_t _secdp_bigdata_show(const struct class *class,
const struct class_attribute *attr, char *buf);
ssize_t _secdp_bigdata_store(const struct class *class,
const struct class_attribute *attr, const char *buf, size_t size);
#endif /* DISPLAYPORT_BIGDATA_H */

View File

@@ -0,0 +1,94 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2017-2021, The Linux Foundation. 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 version 2 and
* only version 2 as published by the Free Software Foundation.
*
* 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 _SECDP_LOGGER_H_
#define _SECDP_LOGGER_H_
#ifdef CONFIG_SECDP_LOGGER
void secdp_logger_set_max_count(int count);
void secdp_logger_print(const char *fmt, ...);
void secdp_logger_hex_dump(void *buf, void *pref, size_t len);
int secdp_logger_init(void);
void secdp_logger_deinit(void);
void secdp_logger_set_mode_max_count(unsigned int count);
void secdp_logger_dec_mode_count(void);
void secdp_logger_print_mode(const char *fmt, ...);
#define secdp_pr_debug(fmt, ...) \
printk(KERN_DEBUG "[msm-dp] %s: " pr_fmt(fmt), __func__, ##__VA_ARGS__)
#define secdp_proc_err(fmt, ...) \
do { \
printk(KERN_ERR "[msm-dp] %s: " pr_fmt(fmt), __func__, ##__VA_ARGS__); \
secdp_logger_print(fmt, ##__VA_ARGS__); \
} while (0)
#define secdp_proc_info(fmt, ...) \
do { \
printk(KERN_INFO "[msm-dp] %s: " pr_fmt(fmt), __func__, ##__VA_ARGS__); \
secdp_logger_print(fmt, ##__VA_ARGS__); \
} while (0)
#define secdp_proc_warn(fmt, ...) \
do { \
printk(KERN_WARNING "[msm-dp] %s: " pr_fmt(fmt), __func__, ##__VA_ARGS__); \
secdp_logger_print(fmt, ##__VA_ARGS__); \
} while (0)
#define secdp_proc_info_mode(fmt, ...) \
do { \
printk(KERN_INFO "[msm-dp] %s: " pr_fmt(fmt), __func__, ##__VA_ARGS__); \
secdp_logger_print_mode(fmt, ##__VA_ARGS__); \
} while (0)
#define DP_INFO_M(fmt, ...) secdp_proc_info_mode(fmt, ##__VA_ARGS__)
#ifdef pr_debug
#undef pr_debug
#define pr_debug secdp_pr_debug
#endif
#ifdef pr_err
#undef pr_err
#define pr_err secdp_proc_err
#endif
#ifdef pr_info
#undef pr_info
#define pr_info secdp_proc_info
#endif
#ifdef pr_warn
#undef pr_warn
#define pr_warn secdp_proc_warn
#endif
#else/* !CONFIG_SECDP_LOGGER */
#define secdp_logger_set_max_count(x) do {} while (0)
#define secdp_logger_print(fmt, ...) do {} while (0)
#define secdp_logger_hex_dump(buf, pref, len) do {} while (0)
#define secdp_logger_init(void) do {} while (0)
#ifdef pr_debug
#undef pr_debug
#define pr_debug pr_info
#endif
#endif
#endif/*_SECDP_LOGGER_H_*/

View File

@@ -0,0 +1,54 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2017-2021, The Linux Foundation. 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 version 2 and
* only version 2 as published by the Free Software Foundation.
*
* 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 _SECDP_LOGGER_EX_H_
#define _SECDP_LOGGER_EX_H_
/*
* if .c has its own pr_fmt, then use this instead of secdp_logger.h
*/
#ifdef CONFIG_SECDP_LOGGER
void secdp_logger_print(const char *fmt, ...);
#define secdp_proc_info_ex(fmt, ...) \
do { \
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__); \
secdp_logger_print(fmt, ##__VA_ARGS__); \
} while (0)
#define secdp_pr_info_ex(fmt, ...) \
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
#ifdef pr_debug
#undef pr_debug
#define pr_debug secdp_pr_info_ex
#endif
#ifdef pr_err
#undef pr_err
#define pr_err secdp_proc_info_ex
#endif
#ifdef pr_info
#undef pr_info
#define pr_info secdp_proc_info_ex
#endif
#ifdef pr_warn
#undef pr_warn
#define pr_warn secdp_proc_info_ex
#endif
#endif/*CONFIG_SECDP_LOGGER*/
#endif/*_SECDP_LOGGER_EX_H_*/