On Fri, Sep 8, 2023 at 9:29 PM Fei Shao <fshao@xxxxxxxxxxxx> wrote: > > The driver uses the upper-bound approach to decide the target JPEG > encode quality, but there's a logic bug that if the desired quality is > higher than what the driver can support, the driver falls back to using > the worst quality. > > Fix the bug by assuming using the best quality in the beginning, and > with trivial refactor to avoid long lines. > > Fixes: 45f13a57d813 ("media: platform: Add jpeg enc feature") > Signed-off-by: Fei Shao <fshao@xxxxxxxxxxxx> Reviewed-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>