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

@@ -55,6 +55,27 @@
defined(CONFIG_DEBUG_FS)
static DEFINE_SPINLOCK(sde_rot_xlock);
#if IS_ENABLED(CONFIG_DISPLAY_SAMSUNG)
/**
* To pulling out 256 * 4 eventlog line & print to kernel log
*/
#undef SDE_EVTLOG_DEFAULT_REGDUMP
#undef SDE_EVTLOG_DEFAULT_VBIF_DBGBUSDUMP
#undef SDE_EVTLOG_DEFAULT_ROT_DBGBUSDUMP
#define SDE_EVTLOG_DEFAULT_REGDUMP SDE_ROT_DBG_DUMP_IN_LOG
#define SDE_EVTLOG_DEFAULT_VBIF_DBGBUSDUMP SDE_ROT_DBG_DUMP_IN_LOG
#define SDE_EVTLOG_DEFAULT_ROT_DBGBUSDUMP SDE_ROT_DBG_DUMP_IN_LOG
#undef SDE_ROT_EVTLOG_PRINT_ENTRY
#undef SDE_ROT_EVTLOG_ENTRY
#define SDE_ROT_EVTLOG_PRINT_ENTRY (256 * 4)
#define SDE_ROT_EVTLOG_ENTRY SDE_ROT_EVTLOG_PRINT_ENTRY
#endif
/*
* tlog - EVTLOG entry structure
* @counter - EVTLOG entriy counter

View File

@@ -127,6 +127,12 @@ static void sde_rotator_get_config_from_ctx(struct sde_rotator_ctx *ctx,
config->output.comp_ratio.numer = 1;
config->output.comp_ratio.denom = 1;
#if IS_ENABLED(CONFIG_DISPLAY_SAMSUNG)
/* Increase rotator clock for 3840x2160 4K 30fps UHD video play */
if (config->input.width * config->input.height >= ((3840-100)*(2160-100)))
config->frame_rate = 60;
#endif
/*
* Use compression ratio of the first buffer to estimate
* performance requirement of the session. If core layer does

View File

@@ -25,6 +25,12 @@
#include "sde_rotator_smmu.h"
#include "sde_rotator_debug.h"
#if IS_ENABLED(CONFIG_DISPLAY_SAMSUNG)
#include <linux/delay.h>
#include "../msm/samsung/ss_dsi_panel_debug.h"
#include <linux/sec_debug.h>
#endif
#define SMMU_SDE_ROT_SEC "qcom,smmu_sde_rot_sec"
#define SMMU_SDE_ROT_UNSEC "qcom,smmu_sde_rot_unsec"
@@ -320,6 +326,9 @@ int sde_smmu_map_dma_buf(struct dma_buf *dma_buf,
int rc;
struct sde_smmu_client *sde_smmu = sde_smmu_get_cb(domain);
unsigned long attrs = 0;
#if IS_ENABLED(CONFIG_DISPLAY_SAMSUNG)
int retry_cnt;
#endif
if (!sde_smmu) {
SDEROT_ERR("not able to get smmu context\n");
@@ -328,6 +337,23 @@ int sde_smmu_map_dma_buf(struct dma_buf *dma_buf,
rc = dma_map_sg_attrs(sde_smmu->dev, table->sgl, table->nents, dir,
attrs);
#if IS_ENABLED(CONFIG_DISPLAY_SAMSUNG)
if (!in_interrupt()) {
if (!rc) {
for (retry_cnt = 0; retry_cnt < 62 ; retry_cnt++) {
/* To wait free page by memory reclaim*/
usleep_range(16000, 16000);
SDEROT_ERR("dma map sg failed : retry (%d)\n", retry_cnt);
rc = dma_map_sg_attrs(sde_smmu->dev, table->sgl, table->nents, dir,
attrs);
if (!rc)
break;
}
}
}
#endif
if (!rc) {
SDEROT_ERR("dma map sg failed\n");
return -ENOMEM;
@@ -474,6 +500,10 @@ static int sde_smmu_fault_handler(struct iommu_domain *domain,
iova, flags);
SDEROT_ERR("SMMU device:%s", sde_smmu->dev->kobj.name);
#if IS_ENABLED(CONFIG_DISPLAY_SAMSUNG)
ss_smmu_debug_log();
#endif
/* generate dump, but no panic */
SDEROT_EVTLOG_TOUT_HANDLER("rot", "rot_dbg_bus", "vbif_dbg_bus");