Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: averne <averne381@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 07/16] hwcontext_nvtegra: add dynamic frequency scaling routines
Date: Sat, 29 Jun 2024 21:35:42 +0200
Message-ID: <7adf060b-6c24-4d0d-a851-688c8ef7b0dd@gmail.com> (raw)
In-Reply-To: <09ecb36c-d46c-4777-842b-e0cb713accdf@jkqxz.net>

Le 05/06/2024 à 22:50, Mark Thompson a écrit :
> On 30/05/2024 20:43, averne wrote:
>> To save on energy, the clock speed of multimedia engines should be adapted to their workload.
>>
>> Signed-off-by: averne <averne381@gmail.com>
>> ---
>>  libavutil/hwcontext_nvtegra.c | 165 ++++++++++++++++++++++++++++++++++
>>  libavutil/hwcontext_nvtegra.h |   7 ++
>>  2 files changed, 172 insertions(+)
>>
>> ...
>> diff --git a/libavutil/hwcontext_nvtegra.h b/libavutil/hwcontext_nvtegra.h
>> index 8a2383d304..7c845951d9 100644
>> --- a/libavutil/hwcontext_nvtegra.h
>> +++ b/libavutil/hwcontext_nvtegra.h
>> @@ -82,4 +82,11 @@ static inline AVNVTegraMap *av_nvtegra_frame_get_fbuf_map(const AVFrame *frame)
>>   */
>>  int av_nvtegra_pixfmt_to_vic(enum AVPixelFormat fmt);
>>  
>> +/*
>> + * Dynamic frequency scaling routines
>> + */
>> +int av_nvtegra_dfs_init(AVHWDeviceContext *ctx, AVNVTegraChannel *channel, int width, int height, double framerate_hz);
>> +int av_nvtegra_dfs_update(AVHWDeviceContext *ctx, AVNVTegraChannel *channel, int bitstream_len, int decode_cycles);
>> +int av_nvtegra_dfs_uninit(AVHWDeviceContext *ctx, AVNVTegraChannel *channel);
>> +
>>  #endif /* AVUTIL_HWCONTEXT_NVTEGRA_H */
>
> This really isn't a sensible thing to have in the public API of ffmpeg.  Why on earth isn't this sort of detail dealt with by the kernel?  (Which can actually see all of the different processes using it, as well.)
>
> Thanks,
>
> - Mark

I completely agree but this is how nvidia does it, as dumb as it may 
seem (at least on Tegra, I don't know about discrete GPUs).
As far as I can tell the kernel has no mechanism in place to monitor 
the occupancy of the decode engine.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2024-06-29 19:36 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 19:43 [FFmpeg-devel] [PATCH 00/16] NVidia Tegra hardware decoding backend averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 01/16] avutil/buffer: add helper to allocate aligned memory averne
2024-05-30 20:38   ` Rémi Denis-Courmont
2024-05-31 21:06     ` averne
2024-05-31 21:44       ` Michael Niedermayer
2024-06-02 18:37         ` averne
2024-06-01  6:59       ` Rémi Denis-Courmont
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 02/16] configure, avutil: add support for HorizonOS averne
2024-05-30 20:37   ` Rémi Denis-Courmont
2024-05-31 21:06     ` averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 03/16] avutil: add ioctl definitions for tegra devices averne
2024-05-30 20:42   ` Rémi Denis-Courmont
2024-05-31 21:06     ` averne
2024-05-31 21:16       ` Timo Rothenpieler
2024-06-02 18:37         ` averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 04/16] avutil: add hardware definitions for NVDEC, NVJPG and VIC averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 05/16] avutil: add common code for nvtegra averne
2024-05-31  8:32   ` Rémi Denis-Courmont
2024-05-31 21:06     ` averne
2024-06-01  7:29       ` Rémi Denis-Courmont
2024-06-05 20:29   ` Mark Thompson
2024-06-29 19:35     ` averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 06/16] avutil: add nvtegra hwcontext averne
2024-06-05 20:47   ` Mark Thompson
2024-06-29 19:35     ` averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 07/16] hwcontext_nvtegra: add dynamic frequency scaling routines averne
2024-06-05 20:50   ` Mark Thompson
2024-06-29 19:35     ` averne [this message]
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 08/16] nvtegra: add common hardware decoding code averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 09/16] nvtegra: add mpeg1/2 hardware decoding averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 10/16] nvtegra: add mpeg4 " averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 11/16] nvtegra: add vc1 " averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 12/16] nvtegra: add h264 " averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 13/16] nvtegra: add hevc " averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 14/16] nvtegra: add vp8 " averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 15/16] nvtegra: add vp9 " averne
2024-05-30 19:43 ` [FFmpeg-devel] [PATCH 16/16] nvtegra: add mjpeg " averne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7adf060b-6c24-4d0d-a851-688c8ef7b0dd@gmail.com \
    --to=averne381@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git