mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
Backmerge tag 'v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Backmerge in rc6 so I can merge msm next easier. Linux 5.19-rc6 Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/component.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/kfifo.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_graph.h>
|
||||
@@ -73,7 +74,6 @@ static int sun4i_drv_bind(struct device *dev)
|
||||
goto free_drm;
|
||||
}
|
||||
|
||||
dev_set_drvdata(dev, drm);
|
||||
drm->dev_private = drv;
|
||||
INIT_LIST_HEAD(&drv->frontend_list);
|
||||
INIT_LIST_HEAD(&drv->engine_list);
|
||||
@@ -114,6 +114,8 @@ static int sun4i_drv_bind(struct device *dev)
|
||||
|
||||
drm_fbdev_generic_setup(drm, 32);
|
||||
|
||||
dev_set_drvdata(dev, drm);
|
||||
|
||||
return 0;
|
||||
|
||||
finish_poll:
|
||||
@@ -130,6 +132,7 @@ static void sun4i_drv_unbind(struct device *dev)
|
||||
{
|
||||
struct drm_device *drm = dev_get_drvdata(dev);
|
||||
|
||||
dev_set_drvdata(dev, NULL);
|
||||
drm_dev_unregister(drm);
|
||||
drm_kms_helper_poll_fini(drm);
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
@@ -367,6 +370,13 @@ static int sun4i_drv_probe(struct platform_device *pdev)
|
||||
|
||||
INIT_KFIFO(list.fifo);
|
||||
|
||||
/*
|
||||
* DE2 and DE3 cores actually supports 40-bit addresses, but
|
||||
* driver does not.
|
||||
*/
|
||||
dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
dma_set_max_seg_size(&pdev->dev, UINT_MAX);
|
||||
|
||||
for (i = 0;; i++) {
|
||||
struct device_node *pipeline = of_parse_phandle(np,
|
||||
"allwinner,pipelines",
|
||||
|
||||
@@ -118,7 +118,7 @@ static bool sun4i_layer_format_mod_supported(struct drm_plane *plane,
|
||||
struct sun4i_layer *layer = plane_to_sun4i_layer(plane);
|
||||
|
||||
if (IS_ERR_OR_NULL(layer->backend->frontend))
|
||||
sun4i_backend_format_is_supported(format, modifier);
|
||||
return sun4i_backend_format_is_supported(format, modifier);
|
||||
|
||||
return sun4i_backend_format_is_supported(format, modifier) ||
|
||||
sun4i_frontend_format_is_supported(format, modifier);
|
||||
|
||||
@@ -93,34 +93,10 @@ crtcs_exit:
|
||||
return crtcs;
|
||||
}
|
||||
|
||||
static int sun8i_dw_hdmi_find_connector_pdev(struct device *dev,
|
||||
struct platform_device **pdev_out)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct device_node *remote;
|
||||
|
||||
remote = of_graph_get_remote_node(dev->of_node, 1, -1);
|
||||
if (!remote)
|
||||
return -ENODEV;
|
||||
|
||||
if (!of_device_is_compatible(remote, "hdmi-connector")) {
|
||||
of_node_put(remote);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pdev = of_find_device_by_node(remote);
|
||||
of_node_put(remote);
|
||||
if (!pdev)
|
||||
return -ENODEV;
|
||||
|
||||
*pdev_out = pdev;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,
|
||||
void *data)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev), *connector_pdev;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct dw_hdmi_plat_data *plat_data;
|
||||
struct drm_device *drm = data;
|
||||
struct device_node *phy_node;
|
||||
@@ -167,30 +143,16 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,
|
||||
return dev_err_probe(dev, PTR_ERR(hdmi->regulator),
|
||||
"Couldn't get regulator\n");
|
||||
|
||||
ret = sun8i_dw_hdmi_find_connector_pdev(dev, &connector_pdev);
|
||||
if (!ret) {
|
||||
hdmi->ddc_en = gpiod_get_optional(&connector_pdev->dev,
|
||||
"ddc-en", GPIOD_OUT_HIGH);
|
||||
platform_device_put(connector_pdev);
|
||||
|
||||
if (IS_ERR(hdmi->ddc_en)) {
|
||||
dev_err(dev, "Couldn't get ddc-en gpio\n");
|
||||
return PTR_ERR(hdmi->ddc_en);
|
||||
}
|
||||
}
|
||||
|
||||
ret = regulator_enable(hdmi->regulator);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to enable regulator\n");
|
||||
goto err_unref_ddc_en;
|
||||
return ret;
|
||||
}
|
||||
|
||||
gpiod_set_value(hdmi->ddc_en, 1);
|
||||
|
||||
ret = reset_control_deassert(hdmi->rst_ctrl);
|
||||
if (ret) {
|
||||
dev_err(dev, "Could not deassert ctrl reset control\n");
|
||||
goto err_disable_ddc_en;
|
||||
goto err_disable_regulator;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(hdmi->clk_tmds);
|
||||
@@ -245,12 +207,8 @@ err_disable_clk_tmds:
|
||||
clk_disable_unprepare(hdmi->clk_tmds);
|
||||
err_assert_ctrl_reset:
|
||||
reset_control_assert(hdmi->rst_ctrl);
|
||||
err_disable_ddc_en:
|
||||
gpiod_set_value(hdmi->ddc_en, 0);
|
||||
err_disable_regulator:
|
||||
regulator_disable(hdmi->regulator);
|
||||
err_unref_ddc_en:
|
||||
if (hdmi->ddc_en)
|
||||
gpiod_put(hdmi->ddc_en);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -264,11 +222,7 @@ static void sun8i_dw_hdmi_unbind(struct device *dev, struct device *master,
|
||||
sun8i_hdmi_phy_deinit(hdmi->phy);
|
||||
clk_disable_unprepare(hdmi->clk_tmds);
|
||||
reset_control_assert(hdmi->rst_ctrl);
|
||||
gpiod_set_value(hdmi->ddc_en, 0);
|
||||
regulator_disable(hdmi->regulator);
|
||||
|
||||
if (hdmi->ddc_en)
|
||||
gpiod_put(hdmi->ddc_en);
|
||||
}
|
||||
|
||||
static const struct component_ops sun8i_dw_hdmi_ops = {
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <drm/bridge/dw_hdmi.h>
|
||||
#include <drm/drm_encoder.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/reset.h>
|
||||
@@ -188,7 +187,6 @@ struct sun8i_dw_hdmi {
|
||||
struct regulator *regulator;
|
||||
const struct sun8i_dw_hdmi_quirks *quirks;
|
||||
struct reset_control *rst_ctrl;
|
||||
struct gpio_desc *ddc_en;
|
||||
};
|
||||
|
||||
extern struct platform_driver sun8i_hdmi_phy_driver;
|
||||
|
||||
Reference in New Issue
Block a user