- Mar 21, 2025
-
-
Nícolas F. R. A. Prado authored
Change buffer width/height alignment to 16. Test: gst-launch-1.0 -v videotestsrc num-buffers=1 ! queue ! video/x-raw,framrate=30/1,width=1920,height=1080, format=NV12 ! v4l2jpegenc ! queue ! jpegparse ! filesink location=out-1920x1080-NV12.jpg CR-Id: AUTO00223695 nfraprado: From my test on JPEG encoding from YVYU, only width needs to be aligned to 16, not height (any height produces a good image). Waiting for feedback from MTK. Change-Id: I2d02bf5636edc5b4b2851440e1cd973eb2d9fbdc Signed-off-by:
kyrie.wu <kyrie.wu@mediatek.com> (cherry picked from commit 373ec5e148df26dfbb7705fcd2fb28ad6f2e7bf7) Signed-off-by:
Macross Chen <macross.chen@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
Add missing error checks along with error messages to elegantly handle invalid pixelformats and unset context. Signed-off-by:
Jianhua Lin <jianhua.lin@mediatek.com> Signed-off-by:
Macross Chen <macross.chen@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
If a file doesn't contain a huffman table, enable the usage of default huffman tables by the hardware decoder. Co-developed-by:
Jianhua Lin <jianhua.lin@mediatek.com> Signed-off-by:
Jianhua Lin <jianhua.lin@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
Move the logic to parse an SOF0 header into its own function. While at it, invert the return value to avoid double negation in the variable's name and when bubbling it up to the caller. Co-developed-by:
Jianhua Lin <jianhua.lin@mediatek.com> Signed-off-by:
Jianhua Lin <jianhua.lin@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
If the End of Image (EOI) marker has been read while parsing a JPEG file, stop parsing. Co-developed-by:
Jianhua Lin <jianhua.lin@mediatek.com> Signed-off-by:
Jianhua Lin <jianhua.lin@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
Early EOS handling. Need to figure out how to test whether this is really needed. OG commit suggests: gst-launch-1.0 -v filesrc location=/tmp/out-1920x1080-YUY2.jpg ! jpegparse ! v4l2jpegdec ! v4l2convert output-io-mode=dmabuf-import capture-io-mode=dmabuf ! checksumsink hash=0 sync=false Signed-off-by:
jianhua.lin <jianhua.lin@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Add dmabuf sync to buf_finish callback. This together with the stall IRQ handling allows a 4K video encoding pipeline to finish (even though the resulting image is incomplete): gst-launch-1.0 -v videotestsrc num-buffers=300 ! video/x-raw,framrate=30/1,width=3840,height=2160,format=YVYU ! queue ! v4l2jpegenc ! queue ! jpegparse ! filesink location=out-3840x2160-YVYU.mjpg Signed-off-by:
jianhua.lin <jianhua.lin@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
When encoding a stream, if the destination buffer is not large enough to fit it, the stall IRQ can be triggered. In this case, handle it by properly finishing the job. Signed-off-by:
Jianhua Lin <jianhua.lin@mediatek.com> Signed-off-by:
Macross Chen <macross.chen@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Copy the timestamp from the source buffer to the destination buffer. With this change the following MJPEG video encoding and decoding gstreamer pipelines succeed, rather than hanging midway, and produce videos that playback as expected: gst-launch-1.0 -v videotestsrc num-buffers=300 ! video/x-raw,framrate=30/1,width=160,height=128,format=YVYU ! queue ! v4l2jpegenc ! queue ! jpegparse ! filesink location=out-160x128-YVYU.mjpg gst-launch-1.0 -v videotestsrc num-buffers=300 ! video/x-raw,framrate=30/1,width=160,height=128,format=YVYU ! jpegenc ! jpegparse ! queue ! v4l2jpegdec ! queue ! filesink location=out-160x128-YVYU.yuv Signed-off-by:
Jianhua Lin <jianhua.lin@mediatek.com> Signed-off-by:
Macross Chen <macross.chen@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
Set V4L2_FMT_FLAG_DYN_RESOLUTION for the decoder. This makes the following image decoding gstreamer pipeline succeed rather than hang: gst-launch-1.0 -v videotestsrc num-buffers=1 ! video/x-raw,framrate=30/1,width=160,height=128,format=YVYU ! jpegenc ! jpegparse ! queue ! v4l2jpegdec ! queue ! filesink location=out-160x128-YVYU.yuv Signed-off-by:
jianhua.lin <jianhua.lin@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Handle the STOP command properly so that for example the following image decoding pipeline can finish automatically instead having to be terminated by hand (Ctrl+C): gst-launch-1.0 -v videotestsrc num-buffers=1 ! video/x-raw,framrate=30/1,width=160,height=128,format=YVYU ! queue ! v4l2jpegenc ! queue ! jpegparse ! filesink location=out-160x128-YVYU.jpg In order to achieve this: - Implement own handler for encoder_cmd and decoder_cmd that makes sure that the buffer state update is serialized and only if the queue is not already stopped. - Implement EOS event subscription. - Mark current state as stopped when the last buffer en/decoding finishes. - When the buffer that should be the last is queued mark it so. Signed-off-by:
Jianhua Lin <jianhua.lin@mediatek.com> Co-developed-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
- Mar 19, 2025
-
-
Nícolas F. R. A. Prado authored
Co-developed-by:
Jianhua Lin <jianhua.lin@mediatek.com> Signed-off-by:
Jianhua Lin <jianhua.lin@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
The HW iommu is able to support a 34-bit (16 GiB) iova address-space. Enable this feature for the encoder/decoder driver by shifting the address by two bits and setting the extended address registers. Signed-off-by:
Jianhua Lin <jianhua.lin@mediatek.com> Co-developed-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
- Mar 14, 2025
-
-
Nícolas F. R. A. Prado authored
# Describe the purpose of this series. The information you put here # will be used by the project maintainer to make a decision whether # your patches should be reviewed, and in what priority order. Please be # very detailed and link to any relevant discussions or sites that the # maintainer can review to better understand your proposed changes. If you # only have a single patch in your series, the contents of the cover # letter will be appended to the "under-the-cut" portion of the patch. # Lines starting with # will be removed from the cover letter. You can # use them to add notes or reminders to yourself. If you want to use # markdown headers in your cover letter, start the line with ">#". # You can add trailers to the cover letter. Any email addresses found in # these trailers will be added to the addresses specified/generated # during the b4 send stage. You can also run "b4 prep --auto-to-cc" to # auto-populate the To: and Cc: trailers based on the code being # modified. Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com> --- b4-submit-tracking --- # This section is used internally by b4 prep for tracking purposes. { "series": { "revision": 1, "change-id": "20250314-mtk-jpeg-genio700-b3deab55e705", "prefixes": [] } }
-
- Mar 05, 2025
-
-
Louis-Alexis Eyraud authored
Add a definition for the on-board HDMI connector, enable and add the relevant configuration for the HDMI PHY and controller, and define the pins used by those. Signed-off-by:
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
-
Louis-Alexis Eyraud authored
This board has a Startek KD070FHFID078 MIPI-DSI panel on the DSI0 connector, so add and configure the pipeline connecting VDOSYS0 components to DSI0, with the needed pinctrl and display nodes in devicetree. Signed-off-by:
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
-
- Mar 04, 2025
-
-
Sjoerd Simons authored
Starting with Mesa 25 AFBC will get more eagerly used. Unfortunately it seems both primary and overlay planes on Genio 700 and Genio 1200 are broken in this regard. On 1200 it results in odd corrupted frames, while on 700 it results in vblank timeouts (for primary planes) Add a HACK to disable AFBC for now until this can be further diagnosed
-
Julien Massot authored
The Radxa 8 HD touchscreen can be used with various Radxa board and is sold appart from the Radxa NIO 12L development kit. Add a DTS overlay for this panel. Signed-off-by:
Julien Massot <julien.massot@collabora.com>
-
Julien Massot authored
This board can use a MIPI-DSI panel on the DSI0 connector: in preparation for adding an overlay for the Radxa Display 8HD, add the backlight, and some definitions for pins available through the DSI0 port. Signed-off-by:
Julien Massot <julien.massot@collabora.com>
-
Mali Bifrost MMU support AArch64 4kB page tables. This feature is in panfrost based the HW_FEATURE_AARCH64_MMU feature flag. Signed-off-by:
Ariel D'Alessandro <ariel.dalessandro@collabora.com>
-
Sjoerd Simons authored
Suggested by Boris; Panfrost does not support uncached mappings, so also flag the pages that are mapped as response to a page fault as cached. TODO: * Merge with other patches from Ariel * Do a full CI run to check for regressions on G52 Signed-off-by:
Sjoerd Simons <sjoerd@collabora.com>
-
Signed-off-by:
Ariel D'Alessandro <ariel.dalessandro@collabora.com>
-
Bifrost MMUs support AArch64 4kB granule specification. However, panfrost only enables MMU in legacy mode, despite the presence of the HW_FEATURE_AARCH64_MMU feature flag. This commit adds support to use page tables according to AArch64 4kB granule specification. This feature is enabled conditionally based on the GPU model's HW_FEATURE_AARCH64_MMU feature flag. Signed-off-by:
Ariel D'Alessandro <ariel.dalessandro@collabora.com>
-
The TRANSTAB (Translation table base address) layout is different depending on the legacy mode configuration. Currently, the defined values apply to the legacy mode. Let's rename them so we can add the ones for no-legacy mode. Signed-off-by:
Ariel D'Alessandro <ariel.dalessandro@collabora.com>
-
As done in panthor, define and use these GPU_MMU_FEATURES_* macros, which makes code easier to read and reuse. Signed-off-by:
Ariel D'Alessandro <ariel.dalessandro@collabora.com>
-
Sjoerd Simons authored
This reverts commit c8e58692.
-
- Feb 26, 2025
-
-
AngeloGioacchino Del Regno authored
This is a defconfig for all MediaTek Genio boards, running on ArchLinux, Debian or PostmarketOS. Signed-off-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
Andrew Perepech authored
Add audio jack detection node. PMIC accessory detect driver will create an input device that will send key events on jack insertion/removal or accessory device key presses. Co-developed-by:
Andrew Perepech <andrew.perepech@mediatek.com> Signed-off-by:
Andrew Perepech <andrew.perepech@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Louis-Alexis Eyraud authored
Add a new gpu node in mt8370.dtsi to enable support for the ARM Mali G57 MC2 GPU (Valhall-JM) found on the MT8370 SoC, using the Panfrost driver. On a Mediatek Genio 510 EVK board, the panfrost driver probed with the following message: ``` panfrost 13000000.gpu: clock rate = 390000000 panfrost 13000000.gpu: mali-g57 id 0x9093 major 0x0 minor 0x0 status 0x0 panfrost 13000000.gpu: features: 00000000,000019f7, issues: 00000003, 80000400 panfrost 13000000.gpu: Features: L2:0x08130206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7 panfrost 13000000.gpu: shader_present=0x5 l2_present=0x1 [drm] Initialized panfrost 1.3.0 for 13000000.gpu on minor 0 ``` Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by:
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
-
Louis-Alexis Eyraud authored
Add a compatible for the MediaTek MT8370 SoC, with an integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core), with the same platform data as MT8186 (one regulator, two power domains). Despite their different GPU architecture (making them not being compatible), the MT8186 platform data can still be used for MT8370 because it only describes supplies, pm_domains and enablement of power management features in the panfrost driver. Reviewed-by:
Steven Price <steven.price@arm.com> Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
-
Louis-Alexis Eyraud authored
Add a compatible for the MediaTek MT8370 SoC, with an integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core). None of the already existing SoC specific compatibles is usable as fallback, as those either do not match the number of cores (and number of power domains), or are for a different GPU architecture. Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by:
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com> Acked-by:
Conor Dooley <conor.dooley@microchip.com>
-
AngeloGioacchino Del Regno authored
Disable GPU here, but leave enabled on MT8370 Genio 510, as issues are seen only on G700.
-
Zoran Zhan authored
Enable audio jack detection on the Genio 700 EVK. This is handled by the MT6359 ACCDET block, which generates an active low EINT interrupt. Add a phandle to the accdet in the sound card node and set the interrupt level. Co-developed-by:
Zoran Zhan <zoran.zhan@mediatek.com> Signed-off-by:
Zoran Zhan <zoran.zhan@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
Instead of parsing an array of 15 integers from the mediatek,pwm-deb-setting property, which makes them harder to identify, parse each value individually from its own property. Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
The code currently allows for values between 0 and 4 for the eint_use_ext_res property, but it should be handled as a boolean, either configuring the internal resistor to be used or not. Update the code accordingly. Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
The mediatek,plugout-debounce property is undocumented in the binding and unhandled by the driver. Remove it. Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
The button detection functionality depends on a calibration voltage value which is currently not updated anywhere in the driver code, and hence it doesn't actually do anything. Remove this unused code. Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
None of the EINT trigger options are implemented and the DT property is not described in the binding. Remove the unused code. Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Nícolas F. R. A. Prado authored
The ACCDET supports two modes for IRQ generation: PMIC EINT or AP GPIO, which in principle could be configured through a DT property. However this DT property has no user nor is documented in a binding, and the driver only implements the PMIC EINT case, so drop the unused code intended to handle both cases. Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-
Andrew Perepech authored
The symbol IRQ_TYPE_LEVEL_LOW is equivalent to 8, but the former should be used for legibility. Update the code accordingly. Signed-off-by:
Andrew Perepech <andrew.perepech@mediatek.com> Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com>
-