Return -EINVAL if there's no PLL configuration for the given pixel
clock. The returned errors are currently ignored by the caller, but
the errno codes will become useful when the compute functions run
during atomic checks.
v2:
* give a rational for this change (Sam)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210714142240.21979-3-tzimmermann@suse.de
if (clock > p_clk_max) {
drm_err(dev, "Pixel Clock %ld too high\n", clock);
- return 1;
+ return -EINVAL;
}
if (clock < p_clk_min >> 3)
if (delta > permitteddelta) {
pr_warn("PLL delta too large\n");
- return 1;
+ return -EINVAL;
}
WREG_MISC_MASKED(MGAREG_MISC_CLKSEL_MGA, MGAREG_MISC_CLKSEL_MASK);