| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307 |
- #include <asm/io.h>
- #include <linux/string.h>
- #include "mt_smi.h"
- #include "smi_configuration.h"
- #include "smi_common.h"
- #include "smi_reg.h"
- /* add static after all platform setting parameters moved to here */
- int is_default_value_saved;
- unsigned int default_val_smi_l1arb[SMI_LARB_NR] = { 0 };
- #define SMI_LARB_NUM_MAX 8
- #if defined(SMI_D1)
- unsigned int smi_dbg_disp_mask = 1;
- unsigned int smi_dbg_vdec_mask = 2;
- unsigned int smi_dbg_imgsys_mask = 4;
- unsigned int smi_dbg_venc_mask = 8;
- unsigned int smi_dbg_mjc_mask = 0;
- unsigned long smi_common_l1arb_offset[SMI_LARB_NR] = {
- REG_OFFSET_SMI_L1ARB0, REG_OFFSET_SMI_L1ARB1, REG_OFFSET_SMI_L1ARB2
- };
- unsigned long smi_larb0_debug_offset[SMI_LARB0_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_larb1_debug_offset[SMI_LARB1_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_larb2_debug_offset[SMI_LARB2_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_larb3_debug_offset[SMI_LARB3_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_common_debug_offset[SMI_COMMON_DEBUG_OFFSET_NUM] = {
- 0x100, 0x104, 0x108, 0x10C, 0x110, 0x114, 0x220, 0x230, 0x234, 0x238, 0x400, 0x404, 0x408,
- 0x40C, 0x430, 0x440
- };
- int smi_larb_debug_offset_num[SMI_LARB_NR] = {
- SMI_LARB0_DEBUG_OFFSET_NUM, SMI_LARB1_DEBUG_OFFSET_NUM, SMI_LARB2_DEBUG_OFFSET_NUM,
- SMI_LARB3_DEBUG_OFFSET_NUM
- };
- unsigned long *smi_larb_debug_offset[SMI_LARB_NR] = {
- smi_larb0_debug_offset, smi_larb1_debug_offset, smi_larb2_debug_offset,
- smi_larb3_debug_offset
- };
- #define SMI_PROFILE_SETTING_COMMON_INIT_NUM 7
- #define SMI_VC_SETTING_NUM SMI_LARB_NR
- /* vc setting */
- struct SMI_SETTING_VALUE smi_vc_setting[SMI_VC_SETTING_NUM] = {
- {0x20, 0}, {0x20, 2}, {0x20, 1}, {0x20, 1}
- };
- /* init_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_init[SMI_PROFILE_SETTING_COMMON_INIT_NUM] = {
- {0, 0}, {0, 0x1000}, {0, 0x1000}, {0, 0x1000},
- {0x100, 0x1b},
- {0x234, (0x1 << 31) + (0x1d << 26) + (0x1f << 21) + (0x0 << 20) + (0x3 << 15)
- + (0x4 << 10) + (0x4 << 5) + 0x5},
- {0x230, 0x1f + (0x8 << 4) + (0x7 << 9)}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_init[SMI_LARB0_PORT_NUM] = {
- {0x200, 0x1f}, {0x204, 4}, {0x208, 6}, {0x20c, 0x1f}, {0x210, 4}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_init[SMI_LARB1_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_init[SMI_LARB2_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
- 1},
- {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb3_init[SMI_LARB3_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
- };
- struct SMI_SETTING init_setting_config = {
- SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
- smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
- };
- #define SMI_PROFILE_SETTING_COMMON_VR_NUM SMI_LARB_NR
- /* vr_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vr[SMI_PROFILE_SETTING_COMMON_VR_NUM] = {
- {0, 0x11F1}, {0, 0x1000}, {0, 0x120A}, {0, 0x11F3}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vr[SMI_LARB0_PORT_NUM] = {
- {0x200, 8}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 2}, {0x218, 4}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vr[SMI_LARB1_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_vr[SMI_LARB2_PORT_NUM] = {
- {0x200, 1}, {0x204, 4}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 4}, {0x22c, 1}, {0x230, 2}, {0x234, 2}, {0x238, 1}, {0x23c,
- 1},
- {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb3_vr[SMI_LARB3_PORT_NUM] = {
- {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 3}, {0x230, 2}
- };
- struct SMI_SETTING vr_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- #define SMI_PROFILE_SETTING_COMMON_VP_NUM SMI_LARB_NR
- /* vp_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vp[SMI_PROFILE_SETTING_COMMON_VP_NUM] = {
- {0, 0x1262}, {0, 0x11E9}, {0, 0x1000}, {0, 0x123D}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vp[SMI_LARB0_PORT_NUM] = {
- {0x200, 8}, {0x204, 1}, {0x208, 2}, {0x20c, 1}, {0x210, 3}, {0x214, 1}, {0x218, 4}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vp[SMI_LARB1_PORT_NUM] = {
- {0x200, 0xb}, {0x204, 0xe}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_vp[SMI_LARB2_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
- 1},
- {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb3_vp[SMI_LARB3_PORT_NUM] = {
- {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 3}, {0x230, 2}
- };
- struct SMI_SETTING vp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
- smi_profile_setting_larb3_vp}
- };
- /* vr series */
- struct SMI_SETTING icfp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- struct SMI_SETTING vr_slow_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- struct SMI_SETTING venc_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- /* vp series */
- struct SMI_SETTING vpwfd_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
- smi_profile_setting_larb3_vp}
- };
- struct SMI_SETTING swdec_vp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
- smi_profile_setting_larb3_vp}
- };
- /* init series */
- struct SMI_SETTING mm_gpu_setting_config = {
- SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
- smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
- };
- struct SMI_SETTING ui_idle_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING hdmi_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING hdmi4k_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING vss_setting_config = { 0, NULL, {0}, {0} };
- #elif defined(SMI_D3)
- unsigned int smi_dbg_disp_mask = 1;
- unsigned int smi_dbg_vdec_mask = 2;
- unsigned int smi_dbg_imgsys_mask = 4;
- unsigned int smi_dbg_venc_mask = 8;
- unsigned int smi_dbg_mjc_mask = 0;
- unsigned long smi_common_l1arb_offset[SMI_LARB_NR] = {
- REG_OFFSET_SMI_L1ARB0, REG_OFFSET_SMI_L1ARB1, REG_OFFSET_SMI_L1ARB2, REG_OFFSET_SMI_L1ARB3
- };
- static unsigned long smi_larb0_debug_offset[SMI_LARB0_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- static unsigned long smi_larb1_debug_offset[SMI_LARB1_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- static unsigned long smi_larb2_debug_offset[SMI_LARB2_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- static unsigned long smi_larb3_debug_offset[SMI_LARB3_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_common_debug_offset[SMI_COMMON_DEBUG_OFFSET_NUM] = {
- 0x100, 0x104, 0x108, 0x10C, 0x110, 0x114, 0x220, 0x230, 0x234, 0x238, 0x400, 0x404, 0x408,
- 0x40C, 0x430, 0x440
- };
- int smi_larb_debug_offset_num[SMI_LARB_NR] = {
- SMI_LARB0_DEBUG_OFFSET_NUM, SMI_LARB1_DEBUG_OFFSET_NUM, SMI_LARB2_DEBUG_OFFSET_NUM,
- SMI_LARB3_DEBUG_OFFSET_NUM
- };
- unsigned long *smi_larb_debug_offset[SMI_LARB_NR] = {
- smi_larb0_debug_offset, smi_larb1_debug_offset, smi_larb2_debug_offset,
- smi_larb3_debug_offset
- };
- #define SMI_PROFILE_SETTING_COMMON_INIT_NUM 7
- #define SMI_VC_SETTING_NUM SMI_LARB_NR
- /* vc setting */
- struct SMI_SETTING_VALUE smi_vc_setting[SMI_VC_SETTING_NUM] = {
- {0x20, 0}, {0x20, 2}, {0x20, 1}, {0x20, 1}
- };
- /* init_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_init[SMI_PROFILE_SETTING_COMMON_INIT_NUM] = {
- {0, 0}, {0, 0x1000}, {0, 0x1000}, {0, 0x1000},
- {0x100, 0xb},
- {0x234, (0x1 << 31) + (0x1d << 26) + (0x1f << 21) + (0x0 << 20) + (0x3 << 15)
- + (0x4 << 10) + (0x4 << 5) + 0x5},
- {0x230, 0xf + (0x8 << 4) + (0x7 << 9)}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_init[SMI_LARB0_PORT_NUM] = {
- {0x200, 0x1f}, {0x204, 8}, {0x208, 6}, {0x20c, 0x1f}, {0x210, 4}, {0x214, 1}, {0x218, 0},
- {0x21c, 2},
- {0x220, 1}, {0x224, 3}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_init[SMI_LARB1_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_init[SMI_LARB2_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
- 1},
- {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb3_init[SMI_LARB3_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
- };
- struct SMI_SETTING init_setting_config = {
- SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
- smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
- };
- #define SMI_PROFILE_SETTING_COMMON_VR_NUM SMI_LARB_NR
- /* vr_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vr[SMI_PROFILE_SETTING_COMMON_VR_NUM] = {
- {0, 0x1417}, {0, 0x1000}, {0, 0x11D0}, {0, 0x11F8}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vr[SMI_LARB0_PORT_NUM] = {
- {0x200, 0xa}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1},
- {0x21c, 4},
- {0x220, 1}, {0x224, 6}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vr[SMI_LARB1_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_vr[SMI_LARB2_PORT_NUM] = {
- {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 2}, {0x21c,
- 1},
- {0x220, 2}, {0x224, 1}, {0x228, 1}, {0x22c, 8}, {0x230, 1}, {0x234, 1}, {0x238, 2}, {0x23c,
- 2},
- {0x240, 2}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb3_vr[SMI_LARB3_PORT_NUM] = {
- {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 3}, {0x230, 2}
- };
- struct SMI_SETTING vr_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- #define SMI_PROFILE_SETTING_COMMON_VP_NUM SMI_LARB_NR
- /* vp_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vp[SMI_PROFILE_SETTING_COMMON_VP_NUM] = {
- {0, 0x1262}, {0, 0x11E9}, {0, 0x1000}, {0, 0x123D}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vp[SMI_LARB0_PORT_NUM] = {
- {0x200, 8}, {0x204, 1}, {0x208, 2}, {0x20c, 1}, {0x210, 3}, {0x214, 1}, {0x218, 4}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vp[SMI_LARB1_PORT_NUM] = {
- {0x200, 0xb}, {0x204, 0xe}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_vp[SMI_LARB2_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
- 1},
- {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb3_vp[SMI_LARB3_PORT_NUM] = {
- {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 3}, {0x230, 2}
- };
- struct SMI_SETTING vp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
- smi_profile_setting_larb3_vp}
- };
- #define SMI_PROFILE_SETTING_COMMON_VPWFD_NUM SMI_LARB_NR
- /* vpwfd_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vpwfd[SMI_PROFILE_SETTING_COMMON_VPWFD_NUM] = {
- {0, 0x14B6}, {0, 0x11EE}, {0, 0x1000}, {0, 0x11F2}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vpwfd[SMI_LARB0_PORT_NUM] = {
- {0x200, 0xc}, {0x204, 8}, {0x208, 6}, {0x20c, 0xc}, {0x210, 4}, {0x214, 1}, {0x218, 1},
- {0x21c, 3},
- {0x220, 2}, {0x224, 5}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vpwfd[SMI_LARB1_PORT_NUM] = {
- {0x200, 0xb}, {0x204, 0xe}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_vpwfd[SMI_LARB2_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
- 1},
- {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb3_vpwfd[SMI_LARB3_PORT_NUM] = {
- {0x200, 1}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 3}, {0x230, 2}
- };
- struct SMI_SETTING vpwfd_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VPWFD_NUM, smi_profile_setting_common_vpwfd,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vpwfd, smi_profile_setting_larb1_vpwfd,
- smi_profile_setting_larb2_vpwfd, smi_profile_setting_larb3_vpwfd}
- };
- #define SMI_PROFILE_SETTING_COMMON_ICFP_NUM SMI_LARB_NR
- /* icfp_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_icfp[SMI_PROFILE_SETTING_COMMON_ICFP_NUM] = {
- {0, 0x14E2}, {0, 0x1000}, {0, 0x1310}, {0, 0x106F}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_icfp[SMI_LARB0_PORT_NUM] = {
- {0x200, 0xe}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1},
- {0x21c, 2},
- {0x220, 2}, {0x224, 3}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_icfp[SMI_LARB1_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_icfp[SMI_LARB2_PORT_NUM] = {
- {0x200, 0xc}, {0x204, 4}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1},
- {0x21c, 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 3}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
- 1},
- {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb3_icfp[SMI_LARB3_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
- };
- struct SMI_SETTING icfp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_ICFP_NUM, smi_profile_setting_common_icfp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_icfp, smi_profile_setting_larb1_icfp,
- smi_profile_setting_larb2_icfp, smi_profile_setting_larb3_icfp}
- };
- /* vr series */
- struct SMI_SETTING vr_slow_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- struct SMI_SETTING venc_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- /* vp series */
- struct SMI_SETTING swdec_vp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
- smi_profile_setting_larb3_vp}
- };
- /* init seris */
- struct SMI_SETTING mm_gpu_setting_config = {
- SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
- smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
- };
- struct SMI_SETTING vss_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING ui_idle_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING hdmi_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING hdmi4k_setting_config = { 0, NULL, {0}, {0} };
- #elif defined(SMI_J)
- unsigned int smi_dbg_disp_mask = 1;
- unsigned int smi_dbg_vdec_mask = 2;
- unsigned int smi_dbg_imgsys_mask = 4;
- unsigned int smi_dbg_venc_mask = 8;
- unsigned int smi_dbg_mjc_mask = 0;
- unsigned long smi_common_l1arb_offset[SMI_LARB_NR] = {
- REG_OFFSET_SMI_L1ARB0, REG_OFFSET_SMI_L1ARB1, REG_OFFSET_SMI_L1ARB2, REG_OFFSET_SMI_L1ARB3
- };
- unsigned long smi_larb0_debug_offset[SMI_LARB0_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_larb1_debug_offset[SMI_LARB1_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_larb2_debug_offset[SMI_LARB2_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_larb3_debug_offset[SMI_LARB3_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_common_debug_offset[SMI_COMMON_DEBUG_OFFSET_NUM] = {
- 0x100, 0x104, 0x108, 0x10C, 0x110, 0x114, 0x220, 0x230, 0x234, 0x238, 0x400, 0x404, 0x408,
- 0x40C, 0x430, 0x440
- };
- int smi_larb_debug_offset_num[SMI_LARB_NR] = {
- SMI_LARB0_DEBUG_OFFSET_NUM, SMI_LARB1_DEBUG_OFFSET_NUM, SMI_LARB2_DEBUG_OFFSET_NUM,
- SMI_LARB3_DEBUG_OFFSET_NUM
- };
- unsigned long *smi_larb_debug_offset[SMI_LARB_NR] = {
- smi_larb0_debug_offset, smi_larb1_debug_offset, smi_larb2_debug_offset,
- smi_larb3_debug_offset
- };
- #define SMI_PROFILE_SETTING_COMMON_INIT_NUM 7
- #define SMI_VC_SETTING_NUM SMI_LARB_NR
- #define SMI_INITSETTING_LARB0_NUM (SMI_LARB0_PORT_NUM + 4)
- /* vc setting */
- struct SMI_SETTING_VALUE smi_vc_setting[SMI_VC_SETTING_NUM] = {
- {0x20, 0}, {0x20, 2}, {0x20, 1}, {0x20, 1}
- };
- /* ISP HRT setting */
- struct SMI_SETTING_VALUE smi_isp_hrt_setting[SMI_LARB_NR] = {
- {0x24, 0}, {0x24, 0}, {0x24, 0}, {0x24, 0}
- };
- /* init_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_init[SMI_PROFILE_SETTING_COMMON_INIT_NUM] = {
- {0, 0x15AE}, {0, 0x1000}, {0, 0x1000}, {0, 0x1000},
- {0x100, 0xb},
- {0x234, ((0x1 << 31) + (0x1d << 26) + (0x1f << 21) + (0x0 << 20) + (0x3 << 15)
- + (0x4 << 10) + (0x4 << 5) + 0x5)},
- {0x230, 0xf + (0x8 << 4) + (0x7 << 9)}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_init[SMI_INITSETTING_LARB0_NUM] = {
- {0x200, 31}, {0x204, 8}, {0x208, 6}, {0x20c, 31}, {0x210, 4}, {0x214, 1}, {0x218, 31},
- {0x21c, 31},
- {0x220, 2}, {0x224, 1}, {0x228, 3}, {0x100, 5}, {0x10c, 5}, {0x118, 5}, {0x11c, 5}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_init[SMI_LARB1_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_init[SMI_LARB2_PORT_NUM] = {
- {0x200, 1}, {0x204, 4}, {0x208, 2}, {0x20c, 2}, {0x210, 2}, {0x214, 1}, {0x218, 2}, {0x21c,
- 2},
- {0x220, 2}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 2}, {0x238, 1}, {0x23c,
- 1},
- {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb3_init[SMI_LARB3_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
- };
- struct SMI_SETTING init_setting_config = {
- SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
- {SMI_INITSETTING_LARB0_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
- smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
- };
- #define SMI_PROFILE_SETTING_COMMON_VR_NUM SMI_LARB_NR
- /* vr_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vr[SMI_PROFILE_SETTING_COMMON_VR_NUM] = {
- {0, 0x1393}, {0, 0x1000}, {0, 0x1205}, {0, 0x11D4}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vr[SMI_LARB0_PORT_NUM] = {
- {0x200, 0xe}, {0x204, 8}, {0x208, 4}, {0x20c, 0xe}, {0x210, 4}, {0x214, 1}, {0x218, 0xe},
- {0x21c, 0xe},
- {0x220, 2}, {0x224, 1}, {0x228, 2}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vr[SMI_LARB1_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_vr[SMI_LARB2_PORT_NUM] = {
- {0x200, 1}, {0x204, 4}, {0x208, 2}, {0x20c, 2}, {0x210, 2}, {0x214, 1}, {0x218, 2}, {0x21c,
- 2},
- {0x220, 2}, {0x224, 1}, {0x228, 1}, {0x22c, 2}, {0x230, 1}, {0x234, 2}, {0x238, 1}, {0x23c,
- 1},
- {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb3_vr[SMI_LARB3_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 1}, {0x230, 4}
- };
- struct SMI_SETTING vr_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- #define SMI_PROFILE_SETTING_COMMON_VP_NUM SMI_LARB_NR
- /* vp_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vp[SMI_PROFILE_SETTING_COMMON_VP_NUM] = {
- {0, 0x1510}, {0, 0x1169}, {0, 0x1000}, {0, 0x11CE}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vp[SMI_LARB0_PORT_NUM] = {
- {0x200, 0xc}, {0x204, 8}, {0x208, 4}, {0x20c, 0xc}, {0x210, 4}, {0x214, 2}, {0x218, 0xc},
- {0x21c, 0xc},
- {0x220, 2}, {0x224, 1}, {0x228, 3}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vp[SMI_LARB1_PORT_NUM] = {
- {0x200, 5}, {0x204, 2}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_vp[SMI_LARB2_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}, {0x234, 1}, {0x238, 1}, {0x23c,
- 1},
- {0x240, 1}, {0x244, 1}, {0x248, 1}, {0x24c, 1}, {0x250, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb3_vp[SMI_LARB3_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 2}, {0x228, 1}, {0x22c, 1}, {0x230, 4}
- };
- struct SMI_SETTING vp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
- smi_profile_setting_larb3_vp}
- };
- /* vr series */
- struct SMI_SETTING icfp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- struct SMI_SETTING vr_slow_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- struct SMI_SETTING vss_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- struct SMI_SETTING venc_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr,
- smi_profile_setting_larb3_vr}
- };
- /* vp series */
- struct SMI_SETTING vpwfd_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
- smi_profile_setting_larb3_vp}
- };
- struct SMI_SETTING swdec_vp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp,
- smi_profile_setting_larb3_vp}
- };
- /* init seris */
- struct SMI_SETTING mm_gpu_setting_config = {
- SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
- {SMI_INITSETTING_LARB0_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM, SMI_LARB3_PORT_NUM},
- {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
- smi_profile_setting_larb2_init, smi_profile_setting_larb3_init}
- };
- struct SMI_SETTING ui_idle_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING hdmi_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING hdmi4k_setting_config = { 0, NULL, {0}, {0} };
- #elif defined(SMI_D2)
- unsigned long smi_common_l1arb_offset[SMI_LARB_NR] = {
- REG_OFFSET_SMI_L1ARB0, REG_OFFSET_SMI_L1ARB1, REG_OFFSET_SMI_L1ARB2
- };
- unsigned int smi_dbg_disp_mask = 1;
- unsigned int smi_dbg_vdec_mask = 2;
- unsigned int smi_dbg_imgsys_mask = 4;
- unsigned int smi_dbg_venc_mask = 4;
- unsigned int smi_dbg_mjc_mask = 0;
- unsigned long smi_larb0_debug_offset[SMI_LARB0_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_larb1_debug_offset[SMI_LARB1_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_larb2_debug_offset[SMI_LARB2_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_common_debug_offset[SMI_COMMON_DEBUG_OFFSET_NUM] = {
- 0x100, 0x104, 0x108, 0x10C, 0x110, 0x114, 0x220, 0x230, 0x234, 0x238, 0x400, 0x404, 0x408,
- 0x40C, 0x430, 0x440
- };
- int smi_larb_debug_offset_num[SMI_LARB_NR] = {
- SMI_LARB0_DEBUG_OFFSET_NUM, SMI_LARB1_DEBUG_OFFSET_NUM, SMI_LARB2_DEBUG_OFFSET_NUM
- };
- unsigned long *smi_larb_debug_offset[SMI_LARB_NR] = {
- smi_larb0_debug_offset, smi_larb1_debug_offset, smi_larb2_debug_offset
- };
- #define SMI_VC_SETTING_NUM SMI_LARB_NR
- struct SMI_SETTING_VALUE smi_vc_setting[SMI_VC_SETTING_NUM] = {
- {0x20, 0}, {0x20, 2}, {0x20, 1}
- };
- #define SMI_PROFILE_SETTING_COMMON_INIT_NUM 6
- /* init_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_init[SMI_PROFILE_SETTING_COMMON_INIT_NUM] = {
- {0, 0}, {0, 0}, {0, 0},
- {0x100, 0xb},
- {0x234, (0x1 << 31) + (0x1d << 26) + (0x1f << 21) + (0x0 << 20) + (0x3 << 15)
- + (0x4 << 10) + (0x4 << 5) + 0x5},
- {0x230, (0x7 + (0x8 << 3) + (0x7 << 8))}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_init[SMI_LARB0_PORT_NUM] = {
- {0x200, 0x1f}, {0x204, 0x1f}, {0x208, 4}, {0x20c, 6}, {0x210, 4}, {0x214, 1}, {0x218, 1},
- {0x21c, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_init[SMI_LARB1_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_init[SMI_LARB2_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
- };
- struct SMI_SETTING init_setting_config = {
- SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
- {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
- smi_profile_setting_larb2_init}
- };
- #define SMI_PROFILE_SETTING_COMMON_ICFP_NUM SMI_LARB_NR
- /* icfp_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_icfp[SMI_PROFILE_SETTING_COMMON_ICFP_NUM] = {
- {0, 0x11da}, {0, 0x1000}, {0, 0x1318}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_icfp[SMI_LARB0_PORT_NUM] = {
- {0x200, 6}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_icfp[SMI_LARB1_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_icfp[SMI_LARB2_PORT_NUM] = {
- {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 2}, {0x214, 4}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}, {0x22c, 1}, {0x230, 1}
- };
- struct SMI_SETTING icfp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_ICFP_NUM, smi_profile_setting_common_icfp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
- {smi_profile_setting_larb0_icfp, smi_profile_setting_larb1_icfp,
- smi_profile_setting_larb2_icfp}
- };
- #define SMI_PROFILE_SETTING_COMMON_VR_NUM SMI_LARB_NR
- /* vr_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vr[SMI_PROFILE_SETTING_COMMON_VR_NUM] = {
- {0, 0x11ff}, {0, 0x1000}, {0, 0x1361}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vr[SMI_LARB0_PORT_NUM] = {
- {0x200, 6}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vr[SMI_LARB1_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_vr[SMI_LARB2_PORT_NUM] = {
- {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 4}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 2}, {0x22c, 1}, {0x230, 1}
- };
- struct SMI_SETTING vr_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr}
- };
- #define SMI_PROFILE_SETTING_COMMON_VP_NUM SMI_LARB_NR
- /* vp_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vp[SMI_PROFILE_SETTING_COMMON_VP_NUM] = {
- {0, 0x11ff}, {0, 0}, {0, 0x1361}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vp[SMI_LARB0_PORT_NUM] = {
- {0x200, 8}, {0x204, 8}, {0x208, 1}, {0x20c, 1}, {0x210, 3}, {0x214, 1}, {0x218, 4}, {0x21c,
- 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vp[SMI_LARB1_PORT_NUM] = {
- {0x200, 0xb}, {0x204, 0xe}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_vp[SMI_LARB2_PORT_NUM] = {
- {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 4}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 2}, {0x22c, 1}, {0x230, 1}
- };
- struct SMI_SETTING vp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp}
- };
- #define SMI_PROFILE_SETTING_COMMON_VPWFD_NUM SMI_LARB_NR
- /* vfd_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vpwfd[SMI_PROFILE_SETTING_COMMON_VPWFD_NUM] = {
- {0, 0x11ff}, {0, 0}, {0, 0x1361}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vpwfd[SMI_LARB0_PORT_NUM] = {
- {0x200, 8}, {0x204, 8}, {0x208, 1}, {0x20c, 1}, {0x210, 3}, {0x214, 1}, {0x218, 4}, {0x21c,
- 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vpwfd[SMI_LARB1_PORT_NUM] = {
- {0x200, 0xb}, {0x204, 0xe}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb2_vpwfd[SMI_LARB2_PORT_NUM] = {
- {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 4}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 2}, {0x22c, 1}, {0x230, 1}
- };
- struct SMI_SETTING vpwfd_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VPWFD_NUM, smi_profile_setting_common_vpwfd,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
- {smi_profile_setting_larb0_vpwfd, smi_profile_setting_larb1_vpwfd,
- smi_profile_setting_larb2_vpwfd}
- };
- /* vp series */
- struct SMI_SETTING swdec_vp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp, smi_profile_setting_larb2_vp}
- };
- /* vr series */
- struct SMI_SETTING vr_slow_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr}
- };
- struct SMI_SETTING venc_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr, smi_profile_setting_larb2_vr}
- };
- /* init series */
- struct SMI_SETTING mm_gpu_setting_config = {
- SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM, SMI_LARB2_PORT_NUM},
- {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init,
- smi_profile_setting_larb2_init}
- };
- struct SMI_SETTING vss_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING ui_idle_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING hdmi_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING hdmi4k_setting_config = { 0, NULL, {0}, {0} };
- #elif defined(SMI_R)
- unsigned int smi_dbg_disp_mask = 1;
- unsigned int smi_dbg_vdec_mask = 0;
- unsigned int smi_dbg_imgsys_mask = 2;
- unsigned int smi_dbg_venc_mask = 2;
- unsigned int smi_dbg_mjc_mask = 0;
- unsigned long smi_common_l1arb_offset[SMI_LARB_NR] = {
- REG_OFFSET_SMI_L1ARB0, REG_OFFSET_SMI_L1ARB1
- };
- unsigned long smi_larb0_debug_offset[SMI_LARB0_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_larb1_debug_offset[SMI_LARB1_DEBUG_OFFSET_NUM] = {
- 0x0, 0x8, 0x10, 0x24, 0x50, 0x60, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0,
- 0xc8,
- 0xcc, 0x200, 0x204, 0x208, 0x20c, 0x210, 0x214, 0x218, 0x21c, 0x220, 0x224, 0x228, 0x22c,
- 0x230,
- 0x234, 0x238, 0x23c, 0x240, 0x244, 0x248, 0x24c, 0x280, 0x284, 0x288, 0x28c, 0x290, 0x294,
- 0x298,
- 0x29c, 0x2a0, 0x2a4, 0x2a8, 0x2ac, 0x2b0, 0x2b4, 0x2b8, 0x2bc, 0x2c0, 0x2c4, 0x2c8, 0x2cc,
- 0x2d0,
- 0x2d4, 0x2d8, 0x2dc, 0x2e0, 0x2e4, 0x2e8, 0x2ec, 0x2f0, 0x2f4, 0x2f8, 0x2fc
- };
- unsigned long smi_common_debug_offset[SMI_COMMON_DEBUG_OFFSET_NUM] = {
- 0x100, 0x104, 0x108, 0x10C, 0x110, 0x114, 0x220, 0x230, 0x234, 0x238, 0x400, 0x404, 0x408,
- 0x40C, 0x430, 0x440
- };
- int smi_larb_debug_offset_num[SMI_LARB_NR] = {
- SMI_LARB0_DEBUG_OFFSET_NUM, SMI_LARB1_DEBUG_OFFSET_NUM
- };
- unsigned long *smi_larb_debug_offset[SMI_LARB_NR] = {
- smi_larb0_debug_offset, smi_larb1_debug_offset
- };
- #define SMI_VC_SETTING_NUM SMI_LARB_NR
- struct SMI_SETTING_VALUE smi_vc_setting[SMI_VC_SETTING_NUM] = {
- {0x20, 0}, {0x20, 2}
- };
- #define SMI_PROFILE_SETTING_COMMON_INIT_NUM 5
- /* init_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_init[SMI_PROFILE_SETTING_COMMON_INIT_NUM] = {
- {0, 0x14cb}, {0, 0x1001},
- {0x100, 0xb},
- {0x234,
- (0x1 << 31) + (0x1d << 26) + (0x1f << 21) + (0x0 << 20) + (0x3 << 15)
- + (0x4 << 10) + (0x4 << 5) + 0x5},
- {0x230, (0x3 + (0x8 << 2) + (0x7 << 7))}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_init[SMI_LARB0_PORT_NUM] = {
- {0x200, 0x1c}, {0x204, 4}, {0x208, 6}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_init[SMI_LARB1_PORT_NUM] = {
- {0x200, 1}, {0x204, 1}, {0x208, 1}, {0x20c, 1}, {0x210, 1}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 1}, {0x224, 1}, {0x228, 1}
- };
- struct SMI_SETTING init_setting_config = {
- SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
- {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init}
- };
- #define SMI_PROFILE_SETTING_COMMON_VR_NUM SMI_LARB_NR
- /* vr_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vr[SMI_PROFILE_SETTING_COMMON_VR_NUM] = {
- {0, 0x122b}, {0, 0x142c}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vr[SMI_LARB0_PORT_NUM] = {
- {0x200, 0xa}, {0x204, 1}, {0x208, 1}, {0x20c, 4}, {0x210, 2}, {0x214, 2}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vr[SMI_LARB1_PORT_NUM] = {
- {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 4}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 3}, {0x224, 2}, {0x228, 2}
- };
- struct SMI_SETTING vr_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr}
- };
- #define SMI_PROFILE_SETTING_COMMON_VP_NUM SMI_LARB_NR
- /* vp_setting */
- struct SMI_SETTING_VALUE smi_profile_setting_common_vp[SMI_PROFILE_SETTING_COMMON_VP_NUM] = {
- {0, 0x11ff}, {0, 0}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb0_vp[SMI_LARB0_PORT_NUM] = {
- {0x200, 8}, {0x204, 1}, {0x208, 1}, {0x20c, 3}, {0x210, 1}, {0x214, 4}, {0x218, 1}
- };
- struct SMI_SETTING_VALUE smi_profile_setting_larb1_vp[SMI_LARB1_PORT_NUM] = {
- {0x200, 8}, {0x204, 6}, {0x208, 1}, {0x20c, 1}, {0x210, 4}, {0x214, 1}, {0x218, 1}, {0x21c,
- 1},
- {0x220, 3}, {0x224, 2}, {0x228, 2}
- };
- struct SMI_SETTING vp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp}
- };
- /* vp series */
- struct SMI_SETTING swdec_vp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VP_NUM, smi_profile_setting_common_vp,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
- {smi_profile_setting_larb0_vp, smi_profile_setting_larb1_vp}
- };
- /* vr series */
- struct SMI_SETTING vr_slow_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr}
- };
- struct SMI_SETTING icfp_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr}
- };
- struct SMI_SETTING venc_setting_config = {
- SMI_PROFILE_SETTING_COMMON_VR_NUM, smi_profile_setting_common_vr,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
- {smi_profile_setting_larb0_vr, smi_profile_setting_larb1_vr}
- };
- /* init series */
- struct SMI_SETTING mm_gpu_setting_config = {
- SMI_PROFILE_SETTING_COMMON_INIT_NUM, smi_profile_setting_common_init,
- {SMI_LARB0_PORT_NUM, SMI_LARB1_PORT_NUM},
- {smi_profile_setting_larb0_init, smi_profile_setting_larb1_init}
- };
- struct SMI_SETTING vss_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING vpwfd_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING ui_idle_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING hdmi_setting_config = { 0, NULL, {0}, {0} };
- struct SMI_SETTING hdmi4k_setting_config = { 0, NULL, {0}, {0} };
- #endif
- struct SMI_PROFILE_CONFIG smi_profile_config[SMI_PROFILE_CONFIG_NUM] = {
- {SMI_BWC_SCEN_NORMAL, &init_setting_config},
- {SMI_BWC_SCEN_VR, &vr_setting_config},
- {SMI_BWC_SCEN_SWDEC_VP, &swdec_vp_setting_config},
- {SMI_BWC_SCEN_VP, &vp_setting_config},
- {SMI_BWC_SCEN_VR_SLOW, &vr_slow_setting_config},
- {SMI_BWC_SCEN_MM_GPU, &mm_gpu_setting_config},
- {SMI_BWC_SCEN_WFD, &vpwfd_setting_config},
- {SMI_BWC_SCEN_VENC, &venc_setting_config},
- {SMI_BWC_SCEN_ICFP, &icfp_setting_config},
- {SMI_BWC_SCEN_UI_IDLE, &ui_idle_setting_config},
- {SMI_BWC_SCEN_VSS, &vss_setting_config},
- {SMI_BWC_SCEN_FORCE_MMDVFS, &init_setting_config},
- {SMI_BWC_SCEN_HDMI, &hdmi_setting_config},
- {SMI_BWC_SCEN_HDMI4K, &hdmi4k_setting_config}
- };
- void smi_set_nonconstant_variable(void)
- {
- #if defined(SMI_D2)
- int i = 0;
- for (i = 0; i < SMI_LARB_NR; ++i) {
- smi_profile_setting_common_init[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_init[i].value = default_val_smi_l1arb[i];
- smi_profile_setting_common_icfp[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_vp[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_vr[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_vpwfd[i].offset = smi_common_l1arb_offset[i];
- }
- smi_profile_setting_common_vp[1].value = default_val_smi_l1arb[1];
- smi_profile_setting_common_vpwfd[1].value = default_val_smi_l1arb[1];
- #elif defined(SMI_D1)
- int i = 0;
- M4U_WriteReg32(LARB2_BASE, 0x24, (M4U_ReadReg32(LARB2_BASE, 0x24) & 0xf7ffffff));
- for (i = 0; i < SMI_LARB_NR; ++i) {
- smi_profile_setting_common_vr[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_vp[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_init[i].offset = smi_common_l1arb_offset[i];
- }
- smi_profile_setting_common_init[0].value = default_val_smi_l1arb[0];
- #elif defined(SMI_D3)
- int i = 0;
- M4U_WriteReg32(LARB2_BASE, 0x24, (M4U_ReadReg32(LARB2_BASE, 0x24) & 0xf7ffffff));
- for (i = 0; i < SMI_LARB_NR; ++i) {
- smi_profile_setting_common_vr[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_vp[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_icfp[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_vpwfd[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_init[i].offset = smi_common_l1arb_offset[i];
- }
- smi_profile_setting_common_init[0].value = default_val_smi_l1arb[0];
- #elif defined(SMI_J)
- unsigned int smi_val = 0;
- int i = 0;
- smi_val = (M4U_ReadReg32(LARB0_BASE, 0x24) & 0xf7ffffff);
- for (i = 0; i < SMI_LARB_NR; ++i)
- smi_isp_hrt_setting[i].value = smi_val;
- for (i = 0; i < SMI_LARB_NR; ++i) {
- smi_profile_setting_common_vr[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_vp[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_init[i].offset = smi_common_l1arb_offset[i];
- }
- #elif defined(SMI_R)
- int i = 0;
- for (i = 0; i < SMI_LARB_NR; ++i) {
- smi_profile_setting_common_vr[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_vp[i].offset = smi_common_l1arb_offset[i];
- smi_profile_setting_common_init[i].offset = smi_common_l1arb_offset[i];
- }
- smi_profile_setting_common_vp[1].offset = smi_common_l1arb_offset[1];
- #endif
- }
|