Import S928BXXU3AXH7 display-driver changes

This commit is contained in:
David Wronek
2024-10-06 19:51:20 +02:00
parent 336a9b0781
commit f6312f1936
147 changed files with 501358 additions and 40 deletions

View File

@@ -53,6 +53,27 @@
#if defined(CONFIG_MSM_SDE_ROTATOR_EVTLOG_DEBUG) && \
defined(CONFIG_DEBUG_FS)
#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
static DEFINE_SPINLOCK(sde_rot_xlock);
/*

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

@@ -27,6 +27,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"
@@ -323,6 +329,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");
@@ -331,6 +340,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;
@@ -338,6 +364,10 @@ int sde_smmu_map_dma_buf(struct dma_buf *dma_buf,
*iova = table->sgl->dma_address;
*size = table->sgl->dma_length;
#if 0 // IS_ENABLED(CONFIG_DISPLAY_SAMSUNG) && IS_ENABLED(CONFIG_SEC_DEBUG) // ksj tmp
if (sec_debug_is_enabled())
ss_smmu_debug_map(SMMU_NRT_ROTATOR_DEBUG, table);
#endif
return 0;
}
@@ -351,6 +381,11 @@ void sde_smmu_unmap_dma_buf(struct sg_table *table, int domain,
return;
}
#if 0 // IS_ENABLED(CONFIG_DISPLAY_SAMSUNG) && IS_ENABLED(CONFIG_SEC_DEBUG) // ksj tmp
if (sec_debug_is_enabled())
ss_smmu_debug_unmap(SMMU_NRT_ROTATOR_DEBUG, table);
#endif
dma_unmap_sg(sde_smmu->dev, table->sgl, table->nents, dir);
}
@@ -477,6 +512,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");