yashsingh1/xdaforums huggingface dataset:
[7" Kindle Fire HD Android Development] Maromi:
it means your device isn't capable.

the differnce between 1.2 and 1.5 GHz is .5 amps. for you to get 1.4 or even 1.5ghz the voltage would have to be between 1.35 to 1.6875 volts(too damn much). i have 1.4 ghz at 1.3 volts which is a 3.7% improvement.
[7" Kindle Fire HD Android Development] bbanghyung:
Hashcode you asked for the /proc/last_kmsg file after a shutdown when trying to initialize the 1.5mhz OC but this file is non-existent.

Instead of following your directions I connected to my Kindle using ADB then I typed:

adb pull /proc/kmsg ./kmsg

I then went into settings and changed the performance OC setting, first from 1200 to 920 then from 920 to 1200 again then finally to 1500. After trying to go back in the settings menu it froze, meaning that it had changed over to 1500mhz.

After that I just typed cat ./kmsg > kmsg.txt to convert the file for you and have uploaded it. Hopefully this can give you a peek into what's going on when the overclock is enabled.

If there is any other files or testing (via terminal or app) I am happy to do it. Combined with the OMAP workaround info it could be something.

Edit: Added more kmsg texts for reference in case they varied. I should also note that this is on your latest build, with your 1.5mhz file flashed.
[7" Kindle Fire HD Android Development] bbanghyung:
Also I found these in /data/tombstones. Another site said there is some information in there. Not sure if it is helpful. Let me know!

Note: I have 8 in all, so I am providing them all. Not sure how relevant they are.

Removed
[7" Kindle Fire HD Android Development] Maromi:
1.5 GHz OV 5/19(If freezing try me)(I need to know if it still freezes)

https://www.dropbox.com/s/86e0n3rw6h...HD7_1.5GHz.zip

MD5:9531c5ed79b2380cb8efc3d19f0f1120
[7" Kindle Fire HD Android Development] jailuis:
Does not freeze on boot, but as soon as I set it to 1.5 freezes.
[7" Kindle Fire HD Android Development] bbanghyung:
The latest update booted, but when switched to 1500 in performance settings it froze. here is the kmsg from that
[7" Kindle Fire HD Android Development] Maromi:
still researching feels like im repeating history with other 4460 devices
[7" Kindle Fire HD Android Development] Maromi:
http://xdaforums.com/showpost.php?p=20089692&postcount=38

ill try fixing only the 1.4 GHz. 200 MHz is a fair OC.
[7" Kindle Fire HD Android Development] south956:
Froze up on boot for me

Sent from P.A.10.1 using Tapatalk 4 beta

---------- Post added at 05:58 PM ---------- Previous post was at 05:49 PM ----------

Somethings better than nothing.... :D

Sent from P.A.10.1 using Tapatalk 4 beta
[7" Kindle Fire HD Android Development] Krsmqn:
Using 1.5 just fine.

Sent from my CyanogenFire HD
[7" Kindle Fire HD Android Development] south956:
Didn't work for me, froze as soon as I enabled 1.5 ghz

Sent from P.A.10.1 using Tapatalk 4 beta
[7" Kindle Fire HD Android Development] Shawnsch:
Mine does 15 just fine too
[7" Kindle Fire HD Android Development] south956:
Mines had problem since first 1.5ghz kernel til now, idk if my kindle is handicapped or something

Sent from P.A.10.1 using Tapatalk 4 beta
[7" Kindle Fire HD Android Development] Krsmqn:
Are you still using PA? I have Hashcodes latest Kernel/Rom installed.

Sent from my CyanogenFire HD
[7" Kindle Fire HD Android Development] quan_1986:
Wait...update
[7" Kindle Fire HD Android Development] Maromi:
what governer are you using before you change the frequency?

try changing the governor to performance first then change the frequency to 1.5 GHz. that way it won't underclock the processor. the freezing might have to do with it underclocking as soon the you change the setting.
[7" Kindle Fire HD Android Development] south956:
OK imma try right now.......

Sent from P.A.10.1 using Tapatalk 4 beta
[7" Kindle Fire HD Android Development] Maromi:
guess it froze
[7" Kindle Fire HD Android Development] south956:
Yes had to restore paranoid android......tried with governor on performance and as soon as I clicked 1500 it froze

:o

Sent from P.A.10.1 using Tapatalk 4 beta
[7" Kindle Fire HD Android Development] Maromi:
thank you for trying it out

definitely hardware bug described in that link i posted.http://xdaforums.com/showpost.php?p=20089692&postcount=38

very few 4460 can run 1.5GHz with DCC enabled or a 3GHz MPU DPLL with DCC disabled
[7" Kindle Fire HD Android Development] rhodri11:
I am having issues getting the OC 1500 to work. I previously ran at 1500 when I used an older version of CM10 so I know my device is capable. I have since updated to the new CM10 tablet version and it's 1200 by default. I have just flashed the 1500 kernel and opened rom toolbox... its allows me to increase to 1500 but as soon as i click 'apply on boot' and reboot my KFHD it is back down to 1200 again! any ideas?
[7" Kindle Fire HD Android Development] Maromi:
here we go again. if you are already using 1.5GHz no need to update

if you were freezing before:

1.5 GHz DCC Off 5/20(if the above one freezes try me DCC off)

https://www.dropbox.com/s/6y9f6z3jikmyser/UV_Modified_Kernel_KFHD7_1.5GHz_DCC_OFF.zip

MD5:1939f660037c36ef9dc37008b9983c86
[7" Kindle Fire HD Android Development] quan_1986:
https://www.dropbox.com/s/6y9f6z3jik...Hz_DCC_OFF.zip <<< Link error .Please upload again ,thanks
[7" Kindle Fire HD Android Development] Maromi:
https://www.dropbox.com/s/6y9f6z3jikmyser/UV_Modified_Kernel_KFHD7_1.5GHz_DCC_OFF.zip

Its correct in the main op
[7" Kindle Fire HD Android Development] south956:
froze again ahhhhh
[7" Kindle Fire HD Android Development] Maromi:
Well odds were it would that's why I'm working on 1.4
[7" Kindle Fire HD Android Development] south956:
Thanks ahead, I was losing hope lol

Sent from P.A.10.1 using Tapatalk 4 beta
[7" Kindle Fire HD Android Development] bbanghyung:
Just sent you another kmsg.txt file from my recent crash on the UV 1.5 DCC OFF.

I had an idea after reading coolbho3000's post. Why not enable something like Pimp My Rom's "Pimp My CPU" feature. That has Governor choice, IO scheduler choice, ability for voltage control if available, and over/under clocking.

Basically What I am thinking is create a program, or enable options in a program that let people try out different values for themselves. In the "[DEVS/KERNEL] Galaxy Nexus 1.4GHz overclock + Undervolting patches" thread people were posting what worked for them, so others could see. This would put some of the experimentation in the hands of the people that are having issues and perhaps they can come to solutions that work for them. Just an idea... Not sure what the implementation of something like that is. Thank again Maromi!

Update: Info on OMAP 4460 from another thread... http://xdaforums.com/showpost.php?p=20062592&postcount=23

Update #2: After reading much on overclocking, I may just have a 4460 that is not worthy of the 1.5 overclock. It is a complicated situation. I am glad you are working on it Maromi. There is not a lot of hope for many of us but you continue on. Thanks again!
[7" Kindle Fire HD Android Development] Jester6:
Huh, well that's damn amazing... I actually have something that can oc. I usually end up with bottom of totem pole cpu/gpu/ram in my PC builds that overclock a fraction off what others get with the same hardware. Anything I can do to help, lemme know.
[7" Kindle Fire HD Android Development] Maromi:
except that errata that came out and i linked too earlier after that post that actually proves that dcc is not needed for 1.2 GHz and coolbho3000 was correct. but if i had choice i would rather have dcc enabled with 1.2GHz than mpu_dpll overclock

and of course those 4460's in the GNex were early versions that didnt have DCC enabled at all.
[7" Kindle Fire HD Android Development] Maromi:
1.4 GHz DCC off

https://www.dropbox.com/s/0aa9vt5oacrrrew/UV_Modified_Kernel_KFHD7_1.4GHz_DCC_OFF.zip

MD5:d8ec92bc44e81c17c0054f375062b606

last one for awhile im going on break. thanks all
[7" Kindle Fire HD Android Development] south956:
:banghead: I'm on it right now but as soon as I try using CPU master to set to 1400 it freezes, wtf is wrong with this kindle

sent from kernel handicapped kindle using tapatalk 4 beta
[7" Kindle Fire HD Android Development] Maromi:
mpu dpll is capped at 2400(technically a overclock) which gives 1.2GHz but i would stick with DCC 1.2GHz(Hashcode's)
[7" Kindle Fire HD Android Development] bbanghyung:
Thanks Maromi. Trying it right now!

Update: Freezes Also. I still think all the work you have done is great Maromi. i wish it had produced greater results for me. I hope others can benefit from your work.
[7" Kindle Fire HD Android Development] DroidIt!:
Hmmm. So what would be the solution here? My kindle runs the 1.5 and 1.4 and whatever else I seem to throw at it. Is there any kind of log I could provide that you could compare with those that don't and maybe figure something out that way? Would be happy to provide anything that might help.

Edit: Oh by the way, for those of us that the original 1.4 and 1.5 were working for, could the link be put back up for the 1.4 version too just in case we need it? Thanks Maromi.
[7" Kindle Fire HD Android Development] Hashcode:
I'm going to be building up a 3.4 kernel for the HDs over the next week or 2. I don't think it will help necessarily, but it will have all of the latest bug patches.

So, there may be hope yet.
[7" Kindle Fire HD Android Development] south956:
+1

sent from kernel handicapped kindle using tapatalk 4 beta
[7" Kindle Fire HD Android Development] persano:
Hashcode, what are you, an alien ? you are exellent !
[7" Kindle Fire HD Android Development] DroidIt!:
:D an alien? :laugh:
[7" Kindle Fire HD Android Development] persano:
yes, because he is very intelligent :confused::confused::confused::confused::confused:
[7" Kindle Fire HD Android Development] bbanghyung:
This is great news!
[7" Kindle Fire HD Android Development] south956:
Can we put a kernel from different source, whats needed in system file

sent from kinblet using Tapatalk 4 beta
[7" Kindle Fire HD Android Development] Hashcode:
Maromi:

I haven't been following your tests in great detail. Did you try disabling smartreflex? Or if you're leaving it enabled, how are you supplying missing volt data (normally pulled from efuse)?

In my tests and from reading a few kmsg crash logs, it seems that if smartreflex is missing volt data for a specific processor freq it will use the last known entry in the table instead. This causes an undervolt situation which is why certain 4460's freeze at 1.5ghz during the boot. Other 4460's have the 1.5ghz volt data on the OMAP and they run fine.

So, I'll probably log the volt entry from my 4460's efuse and setup some platform data in the tate board setup for handling a "missing/override efuse volt data" table. Then, when smartreflex initializes and there's a freq in the opp info which isn't found in efuse, it'll use a value from that table instead.

Thoughts?
[7" Kindle Fire HD Android Development] Maromi:
I haven't disabled smartreflex yet. As for smartreflex missing volt data sounds familiar. Wish i remembered where I read it
[7" Kindle Fire HD Android Development] Maromi:
***ADDED***

1.5GHz SmartReflex off 5/25(if you are freezing)

https://www.dropbox.com/s/e26cqzkxf71zkqd/Smartreflexoff_Modified_Kernel_KFHD7_1.5GHz.zip

MD5:930bc8966fe8a098f6b8b99faa5a165e
[7" Kindle Fire HD Android Development] south956:
:fingers crossed:

---------- Post added at 02:05 AM ---------- Previous post was at 01:46 AM ----------

DAAAMMNN thanks a million I had just given up hope n u never did, well kindle is on 1.5 ghz n running high 8000s on antutu
[7" Kindle Fire HD Android Development] davelinc:
Has worked brilliantly. Thanks. Now have 1500.
[7" Kindle Fire HD Android Development] enzomtrx:
Been running 1.4 for a few days with no problems. About to flash this new 1.5 , that's see what this free bbva kindle can really do. :)

Edit: so far so good. Ran two antutu tests, one at 1.2 got 7919,then at 1.5, got 9235. Nice work!
[7" Kindle Fire HD Android Development] Hashcode:
Thanks for getting this out there Maromi. I'll buzz you when I get a setup for re-enabling smartreflex.
[7" Kindle Fire HD Android Development] Maromi:
FYI

This is just your kernel with smartreflex disabled

CONFIG_OMAP_SMARTREFLEX is not set

CONFIG_OMAP_SMARTREFLEX_CLASS3 is not set

CONFIG_OMAP_SMARTREFLEX_CLASS1P5 is not set
[7" Kindle Fire HD Android Development] Hashcode:
Ah! Then I know exactly what I need to do for a solid 1.5ghz OC with smartreflex enabled.
[7" Kindle Fire HD Android Development] Hashcode:
I know this is Maromi's kernel thread (sorry!), but I went ahead and built a test kernel w/ SmartReflex active + the 1.5ghz overclock.

You can get the details here if you're interested in helping test:

http://xdaforums.com/showpost.php?p=41833959&postcount=494

If the fix is good, I'll post it to github, so that Maromi can continue w/ his kernel development.
[7" Kindle Fire HD Android Development] south956:
As soon as I get home imma try it out, backups r in storage anyway

imported from Cyanoid thru Tapatalk 4 beta
[7" Kindle Fire HD Android Development] Krsmqn:
This isn't necessary if the original 1.5 works for me, right? 'Cause I've been using the original 1.5 from the first day with zero problems.

Sent from my CyanogenFire HD
[7" Kindle Fire HD Android Development] Krsmqn:
From original 1.5.

Sent from my CyanogenFire HD
[7" Kindle Fire HD Android Development] Maromi:
If it already works and doesn't freeze.no its not necessary.
[7" Kindle Fire HD Android Development] Maromi:
This spilled into yours. No prob.
[7" Kindle Fire HD Android Development] enzomtrx:
Just flashed the suggested version, works fine for me.
[7" Kindle Fire HD Android Development] south956:
Which would be better off though?

Sent From TabletUI using Tapatalk 4 beta
[7" Kindle Fire HD Android Development] Maromi:
With smartreflex
[7" Kindle Fire HD Android Development] south956:
I got it on and haven't had a problem thanks to both of u

Sent From TabletUI using Tapatalk 4 beta
[7" Kindle Fire HD Android Development] Hashcode:
Maromi: I posted the new fix for 1.5ghz OC + smartreflex.

https://github.com/KFire-Android/ke...mmit/00ed2d223129aca6d27c597270ec8f0976df9463

And here's where I set the nvalue_override for 1.5ghz:

https://github.com/KFire-Android/ke...mmit/9dbd8305b6686fdfe9de1e01b2f8fcf77a1adcca

Feel free to hit me up if you have any questions.
[7" Kindle Fire HD Android Development] DroidIt!:
I know this is still very much a work in progress, was just wondering if you guys were planning on developing a kernel so that with one kernel we could switch between different CPU frequencies: 1.2, 1.4, and 1.5. Is that even possible or no?
[7" Kindle Fire HD Android Development] south956:
Hashcode can't find your recent kernel fix can u update link or something

abducted from +@!3LE+ ONE by Tapatalk server[\hide]
[7" Kindle Fire HD Android Development] Hollaback12786:
Look in the cm10.1 thread, or goo.im

Sent from my KindleFireHD
[7" Kindle Fire HD Android Development] Daevionne:
Would this work on cm.10.2/ 4.3.1 jelly bean?
[7" Kindle Fire HD Android Development] south956:
No, not anymore it causes tablet to freeze in boot

For your own custom Sig : http://xdaforums.com/showthread.php?t=1922304
[7" Kindle Fire HD Android Development] LinearEquation:
Try Setcpu apk. it works great.
[7" Kindle Fire HD Android Development] nattan920:
Will this work on the KF HD 8.9?
[7" Kindle Fire HD Android Development] south956:
If you are running a rom already, then you should have it already.... Just get developer rights and click performance then oc it.... Do not flash if you are on a rom though because you will softbrick it.

For your own custom Sig : http://xdaforums.com/showthread.php?t=1922304
[7" Kindle Fire HD Android Development] Maromi:
no, this is for tate KFHD7.
[7" Kindle Fire HD Android Development] Maromi:
Update OP

Update OP
[7" Kindle Fire HD Android Development] Mistaz:
Great job! Just flashed the Linaro 4.7.4 14.01 w/ GPU Overclock to 512 MHz up 33% from stock and my Antutu went from 13000 to 13600!

Due to better graphics scores.

Now I´m waiting for the Linaro 4.7.4 14.01 w/ CPU Overclock 42% up to 1.7 GHz ! I hope that I can test it soon!!

Will it have CPU + GPU overclocked? And would it be possible to change the max. settings?

Thx Maromi!
[7" Kindle Fire HD Android Development] Mistaz:
Share kernel please

Hello again Maromi,

I just noticed that according to your signature you are already using an OC CPU+GPU kernel (Linaro 4.7.4 20140130 CPU=1.73 GHz GPU=512 MHz).

May we ask you to share it with us, please?
[7" Kindle Fire HD Android Development] Krsmqn:
Works great! Keep up the good work.
[7" Kindle Fire HD Android Development] Mistaz:
Thx again! Here are my test results:

Linaro 4.7.4 14.01 w/ -O3 optimization, GPU Overclock to 512 MHz up 33% from stock, CPU Overclock 42% up to 1.7 GHz

bootloop after reaching the homescreen. :crying:

smartreflex is off if the above freezes at 1.5 GHz or refuses to boot

Seems to run fine BUT then crashes during Antutu @ 1.7 Ghz :crying: :crying: :crying:

Running fine at 1.5 Ghz though

Any chance to get/test a 1.6 GHz kernel pleeesase!? :D

I saw your Antutu screenshot with the low I/O score.

I once had the same problem and the only solution after many tries was to go back to pure stock and reflash everything (TWRP, CM11,...).

It´s worth the effort because afterwards your device will be a lot faster again!!
[7" Kindle Fire HD Android Development] r3pwn:
Hey, Maromi, if you don't mind, can you please share your sources so I can include this in the next build of CarbonROM?
[7" Kindle Fire HD Android Development] Maromi:
the odds were 1% to be able to run without the override and .01% to be able to run higher than 1.5GHz

1.6 GHz is pointless if you have 1.5.

the GPU one is the only thing that is gonna give any percievable real world boost after the 1.5 GHz CPU.
[7" Kindle Fire HD Android Development] persano:
The difference of the kernel and which of those do you recommend to me. I want to upgrade to cm and i want to use the best kernel
[7" Kindle Fire HD Android Development] Mistaz:
OK, got it. I just wanted to get everything out of my good old KFHD, you know.

Actually the 1.7 "smartflex off" is working with my device and just freezes under extreme conditions --> benchmark.

Maybe someday while you are a little bit bored and not knowing what to, you might have a look into the kernel changing the 1.7 into 1.6.

I (and maybe others as well) really would appreciate your efforts!

And without doubt the GPU-boost is a great gift! :good:
[7" Kindle Fire HD Android Development] south956:
I tried 1.7 and got bootloop then tried the other and didnt get the assigned cpu setting.....
[7" Kindle Fire HD Android Development] conalt:
Also got bootloop with the 1.7Ghz Kernel. But the GPU overclock version seems to work well.

Thanks :good:
[7" Kindle Fire HD Android Development] psychoTR2:
I'm sorry if this has already been asked, but does this kernel still freeze with CM10.2? I tried the GPU OC and it never got past the blue kindle logo. Or, did I not flash it correctly, since I just flashed it like I would a ROM?
[7" Kindle Fire HD Android Development] persano:
this is for cm 11, i think.
[7" Kindle Fire HD Android Development] psychoTR2:
You're right. I flashed CM11 again, and the kernels work flawlessly for me so far, except for the 1.7 GHz with GPU Overclock, unfortunately. That one causes my Kindle to freeze at the blue Kindle Fire logo.
[7" Kindle Fire HD Android Development] persano:
i think it is very unstable. i wish the 1,5 has a bigger gpu overclock
[7" Kindle Fire HD Android Development] Maromi:
Double post
[7" Kindle Fire HD Android Development] Maromi:
Using the sgx544 clocked at 384 in the 2013 model and 8.9 HD as a baseline

the overclock allowed the sgx540 to perform about 2/3 of the performance of the sgx544.

Stock clock sgx540 is about half performance of sgx544

Well technically I'm running the mpu @ 3400 MHz stock is 2400

I do have a DCC enabled kernel so I don't have to run it that high but I can't run the proc lower than 1000 MHz or it will freeze.
[7" Kindle Fire HD Android Development] wire55:
How do I use this? Do I flash like I would a ROM?

Sent from my KFHD running CM11
[7" Kindle Fire HD Android Development] Mistaz:
Yes.

Twrp --> Install --> Kernel zip file
[7" Kindle Fire HD Android Development] persano:
here are the gflops

Exynos 3110

200 MHz

3.2

OMAP 4430

307 MHz

4.9

OMAP 4460

384 MHz

6.1

Atom Z2420

400 MHz

6.4

ATM7021a

RK3168

500 MHz

8.0

i have a sgx 544 gpu in my phone

MT6589T

MT8389T

357 MHz

11.4

if you see, the same sgx 540 at 500 mhz goes to 8 gflops at the ATM and RK chips. with the overclock, our gpu have to go faster, but it isnt like the sgx 544 gpu. i thought a bigger overclock was possible, so we can reach the performance of the MT cpu or the omap 4470 that is

OMAP 4470

384 MHz

12.3
[7" Kindle Fire HD Android Development] Mistaz:
Maybe with CPU@1.6 Ghz + GPU@512Mhz !?! :D
[7" Kindle Fire HD Android Development] wire55:
Do I need to do anything other than just flash it via twrp for the GPU and CPU overclock?

Sent from my KFHD running CM11
[7" Kindle Fire HD Android Development] wire55:
Do I need to do anything else besides just flash for 1.7GHz CPU and 512MHz GPU?

Sent from my KFHD running CM11
[7" Kindle Fire HD Android Development] persano:
i m talking about gpu, not cpu
[7" Kindle Fire HD Android Development] conalt:
Like already said just flash, but make sure you also download the original kernel incase the 1.7ghz one doesn't boot.

Sent from my Kindle Fire HD running CM 11
[7" Kindle Fire HD Android Development] wire55:
Will do. Thanks.

Sent from my KFHD running CM11

---------- Post added at 03:24 AM ---------- Previous post was at 03:14 AM ----------

Glad I did download stock kernel, got a bootloop with the linaro kernel.

Sent from my KFHD running CM11
[7" Kindle Fire HD Android Development] Maromi:
FYI

If you use doubletap2wake you have to reflash it after flashing these kernels.
[7" Kindle Fire HD Android Development] south956:
Is there any alternative to make this work like previous fix for 1.5ghz?

For your own custom Sig : http://xdaforums.com/showthread.php?t=1922304
[7" Kindle Fire HD Android Development] wire55:
Anyone successfully get the 1.7Ghz + 512Mhz working?

Sent from my KFHD running CM11
[7" Kindle Fire HD Android Development] Maromi:
the previous fix was about overriding smartreflex. disabling smartreflex also worked and i did release a 1.7GHz with it disabled but that didn't work.

the 4460 was designed for 1.5 GHz not 1.728 GHz.
[7" Kindle Fire HD Android Development] Maromi:
other than me?
[7" Kindle Fire HD Android Development] wire55:
It doesn't work for me. Although I am on pacrom now.

Sent from my Kindle Fire HD 7 running PAC-man
[7" Kindle Fire HD Android Development] Mistaz:
Yes, for me (almost...) you´ll find the details in POST #112
[7" Kindle Fire HD Android Development] wire55:
I ported AOKP to the Kindle Fire HD recently. It is using hashcodes kernel from CM11, would this kernel work for AOKP?
[7" Kindle Fire HD Android Development] Maromi:
Maybe? if the ROM runs on the same kernel as cm11.
[7" Kindle Fire HD Android Development] wire55:
I used CM11 to port AOKP to the device. The kernel is the CM11 kernel.

Sent from my Kindle Fire HD running AOKP

---------- Post added at 09:00 PM ---------- Previous post was at 08:33 PM ----------

Maromi, can I get the kernel source for the GPU over clock? I just want that source, thank you in advance.

Sent from my Kindle Fire HD running AOKP
[7" Kindle Fire HD Android Development] Maromi:
The code is in the op
[7" Kindle Fire HD Android Development] wire55:
Do you think you could make a little guide on how to compile it?

Sent from my Kindle Fire HD running AOKP
[7" Kindle Fire HD Android Development] Maromi:
this is a CM11 based kernel not AOSP

all i did was download the sources

. build/envsetup.sh

lunch cm_tate-userdebug

make -j8 bootimage

make changes and repeat
[7" Kindle Fire HD Android Development] wire55:
3 commands and it was made???

Sent from my Kindle Fire HD running AOKP