@@ -12,7 +12,6 @@
#include <linux/regulator/consumer.h>
#include <drm/drm_mipi_dsi.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
@@ -42,7 +41,6 @@ struct anbernic_panel_td4310 {
struct gpio_desc *reset_gpio;
struct gpio_desc *enable_gpio;
struct regulator *vdd;
- enum drm_panel_orientation orientation;
};
static inline struct anbernic_panel_td4310 *panel_to_anbernic_panel_td4310(struct drm_panel *panel)
@@ -134,18 +132,10 @@ static int panel_anbernic_td4310_get_mode(struct drm_panel *panel,
return drm_connector_helper_get_modes_fixed(connector, panel_info->display_mode);
}
-static enum drm_panel_orientation panel_anbernic_td4310_get_orientation(struct drm_panel *panel)
-{
- struct anbernic_panel_td4310 *ctx = panel_to_anbernic_panel_td4310(panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs panel_anbernic_td4310_funcs = {
.prepare = panel_anbernic_td4310_prepare,
.unprepare = panel_anbernic_td4310_unprepare,
.get_modes = panel_anbernic_td4310_get_mode,
- .get_orientation = panel_anbernic_td4310_get_orientation,
};
static int panel_anbernic_td4310_probe(struct mipi_dsi_device *dsi)
@@ -166,10 +156,6 @@ static int panel_anbernic_td4310_probe(struct mipi_dsi_device *dsi)
if (!ctx->panel_info)
return -EINVAL;
- ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
- if (ret < 0)
- return dev_err_probe(dev, ret, "Failed to get panel orientation\n");
-
ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
if (IS_ERR(ctx->reset_gpio))
return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
@@ -15,7 +15,6 @@
#include <drm/drm_connector.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
@@ -46,7 +45,6 @@ struct boe_th101mb31ig002 {
struct gpio_desc *enable;
struct gpio_desc *reset;
- enum drm_panel_orientation orientation;
};
static void boe_th101mb31ig002_reset(struct boe_th101mb31ig002 *ctx)
@@ -321,22 +319,11 @@ static int boe_th101mb31ig002_get_modes(struct drm_panel *panel,
return drm_connector_helper_get_modes_fixed(connector, desc_mode);
}
-static enum drm_panel_orientation
-boe_th101mb31ig002_get_orientation(struct drm_panel *panel)
-{
- struct boe_th101mb31ig002 *ctx = container_of(panel,
- struct boe_th101mb31ig002,
- panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs boe_th101mb31ig002_funcs = {
.prepare = boe_th101mb31ig002_prepare,
.unprepare = boe_th101mb31ig002_unprepare,
.disable = boe_th101mb31ig002_disable,
.get_modes = boe_th101mb31ig002_get_modes,
- .get_orientation = boe_th101mb31ig002_get_orientation,
};
static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)
@@ -375,12 +362,6 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(&dsi->dev, PTR_ERR(ctx->reset),
"Failed to get reset GPIO\n");
- ret = drm_of_get_panel_orientation(dsi->dev.of_node,
- &ctx->orientation);
- if (ret)
- return dev_err_probe(&dsi->dev, ret,
- "Failed to get orientation\n");
-
ret = drm_panel_of_backlight(&ctx->panel);
if (ret)
return ret;
@@ -13,7 +13,6 @@
#include <drm/drm_connector.h>
#include <drm/drm_crtc.h>
#include <drm/drm_mipi_dsi.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <video/mipi_display.h>
@@ -47,7 +46,6 @@ struct boe_panel {
const struct panel_desc *desc;
- enum drm_panel_orientation orientation;
struct regulator *pp3300;
struct regulator *pp1800;
struct regulator *avee;
@@ -1669,20 +1667,12 @@ static int boe_panel_get_modes(struct drm_panel *panel,
return 1;
}
-static enum drm_panel_orientation boe_panel_get_orientation(struct drm_panel *panel)
-{
- struct boe_panel *boe = to_boe_panel(panel);
-
- return boe->orientation;
-}
-
static const struct drm_panel_funcs boe_panel_funcs = {
.disable = boe_panel_disable,
.unprepare = boe_panel_unprepare,
.prepare = boe_panel_prepare,
.enable = boe_panel_enable,
.get_modes = boe_panel_get_modes,
- .get_orientation = boe_panel_get_orientation,
};
static int boe_panel_add(struct boe_panel *boe)
@@ -1717,12 +1707,6 @@ static int boe_panel_add(struct boe_panel *boe)
boe->base.prepare_prev_first = true;
- err = drm_of_get_panel_orientation(dev->of_node, &boe->orientation);
- if (err < 0) {
- dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err);
- return err;
- }
-
err = drm_panel_of_backlight(&boe->base);
if (err)
return err;
@@ -21,7 +21,6 @@
#include <drm/drm_crtc.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
@@ -30,7 +29,6 @@ struct panel_info {
struct drm_connector *connector;
struct mipi_dsi_device *dsi;
struct panel_desc *desc;
- enum drm_panel_orientation orientation;
struct gpio_desc *reset_gpio;
struct regulator_bulk_data *supplies;
@@ -284,19 +282,11 @@ static int icna35xx_get_modes(struct drm_panel *panel,
return drm_connector_helper_get_modes_fixed(connector, pinfo->desc->modes);
}
-static enum drm_panel_orientation icna35xx_get_orientation(struct drm_panel *panel)
-{
- struct panel_info *pinfo = to_panel_info(panel);
-
- return pinfo->orientation;
-}
-
static const struct drm_panel_funcs icna35xx_panel_funcs = {
.disable = icna35xx_disable,
.prepare = icna35xx_prepare,
.unprepare = icna35xx_unprepare,
.get_modes = icna35xx_get_modes,
- .get_orientation = icna35xx_get_orientation,
};
static int icna35xx_bl_update_status(struct backlight_device *bl)
@@ -375,12 +365,6 @@ static int icna35xx_probe(struct mipi_dsi_device *dsi)
pinfo->dsi = dsi;
mipi_dsi_set_drvdata(dsi, pinfo);
- ret = drm_of_get_panel_orientation(dev->of_node, &pinfo->orientation);
- if (ret < 0) {
- dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret);
- return ret;
- }
-
pinfo->panel.prepare_prev_first = true;
pinfo->panel.backlight = icna35xx_create_backlight(dsi);
@@ -13,7 +13,6 @@
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <video/mipi_display.h>
@@ -31,7 +30,6 @@ struct ch13726a_panel {
struct regulator_bulk_data *supplies;
struct gpio_desc *reset_gpio;
struct ch13726a_desc *desc;
- enum drm_panel_orientation orientation;
};
struct ch13726a_desc {
@@ -191,19 +189,11 @@ static int ch13726a_get_modes(struct drm_panel *panel,
return ctx->desc->num_modes;
}
-static enum drm_panel_orientation ch13726a_get_orientation(struct drm_panel *panel)
-{
- struct ch13726a_panel *ctx = to_ch13726a_panel(panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs ch13726a_panel_funcs = {
.prepare = ch13726a_prepare,
.unprepare = ch13726a_unprepare,
.disable = ch13726a_disable,
.get_modes = ch13726a_get_modes,
- .get_orientation = ch13726a_get_orientation,
};
static int ch13726a_bl_update_status(struct backlight_device *bl)
@@ -269,12 +259,6 @@ static int ch13726a_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
"Failed to get reset-gpios\n");
- ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
- if (ret < 0) {
- dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret);
- return ret;
- }
-
ctx->dsi = dsi;
mipi_dsi_set_drvdata(dsi, ctx);
@@ -40,7 +40,6 @@
#include <drm/drm_crtc.h>
#include <drm/drm_device.h>
#include <drm/drm_edid.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
/**
@@ -254,7 +253,6 @@ struct panel_edp {
struct drm_display_mode override_mode;
- enum drm_panel_orientation orientation;
};
static inline struct panel_edp *to_panel_edp(struct drm_panel *panel)
@@ -640,13 +638,6 @@ static int panel_edp_get_modes(struct drm_panel *panel,
return num;
}
-static enum drm_panel_orientation panel_edp_get_orientation(struct drm_panel *panel)
-{
- struct panel_edp *p = to_panel_edp(panel);
-
- return p->orientation;
-}
-
static int detected_panel_show(struct seq_file *s, void *data)
{
struct drm_panel *panel = s->private;
@@ -675,7 +666,6 @@ static const struct drm_panel_funcs panel_edp_funcs = {
.prepare = panel_edp_prepare,
.enable = panel_edp_enable,
.get_modes = panel_edp_get_modes,
- .get_orientation = panel_edp_get_orientation,
.debugfs_init = panel_edp_debugfs_init,
};
@@ -863,12 +853,6 @@ static int panel_edp_probe(struct device *dev, const struct panel_desc *desc,
return dev_err_probe(dev, PTR_ERR(panel->enable_gpio),
"failed to request GPIO\n");
- err = drm_of_get_panel_orientation(dev->of_node, &panel->orientation);
- if (err) {
- dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err);
- return err;
- }
-
ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
if (ddc) {
panel->ddc = of_get_i2c_adapter_by_node(ddc);
@@ -21,7 +21,6 @@
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
/* Manufacturer specific Commands send via DSI */
@@ -43,7 +42,6 @@ struct kd35t133 {
struct gpio_desc *reset_gpio;
struct regulator *vdd;
struct regulator *iovcc;
- enum drm_panel_orientation orientation;
};
static inline struct kd35t133 *panel_to_kd35t133(struct drm_panel *panel)
@@ -187,18 +185,10 @@ static int kd35t133_get_modes(struct drm_panel *panel,
return 1;
}
-static enum drm_panel_orientation kd35t133_get_orientation(struct drm_panel *panel)
-{
- struct kd35t133 *ctx = panel_to_kd35t133(panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs kd35t133_funcs = {
.unprepare = kd35t133_unprepare,
.prepare = kd35t133_prepare,
.get_modes = kd35t133_get_modes,
- .get_orientation = kd35t133_get_orientation,
};
static int kd35t133_probe(struct mipi_dsi_device *dsi)
@@ -234,12 +224,6 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi)
return ret;
}
- ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
- if (ret < 0) {
- dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret);
- return ret;
- }
-
mipi_dsi_set_drvdata(dsi, ctx);
ctx->dev = dev;
@@ -17,7 +17,6 @@
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
@@ -31,7 +30,6 @@ struct ota7290b {
struct regulator *vdd;
struct regulator *vcc;
- enum drm_panel_orientation orientation;
};
static inline struct ota7290b *panel_to_ota(struct drm_panel *panel)
@@ -135,18 +133,10 @@ static int ota7290b_get_modes(struct drm_panel *panel,
return drm_connector_helper_get_modes_fixed(connector, &waveshare_dsi_touch_8_8_a_mode);
}
-static enum drm_panel_orientation ota7290b_get_orientation(struct drm_panel *panel)
-{
- struct ota7290b *ctx = panel_to_ota(panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs ota7290b_funcs = {
.prepare = ota7290b_prepare,
.unprepare = ota7290b_unprepare,
.get_modes = ota7290b_get_modes,
- .get_orientation = ota7290b_get_orientation,
};
static int ota7290b_probe(struct mipi_dsi_device *dsi)
@@ -182,13 +172,6 @@ static int ota7290b_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(&dsi->dev, PTR_ERR(ctx->vdd),
"Couldn't get our VDD supply\n");
- ret = drm_of_get_panel_orientation(dsi->dev.of_node, &ctx->orientation);
- if (ret) {
- dev_err(&dsi->dev, "%pOF: failed to get orientation: %d\n",
- dsi->dev.of_node, ret);
- return ret;
- }
-
ret = drm_panel_of_backlight(&ctx->panel);
if (ret)
return ret;
@@ -17,7 +17,6 @@
#include <drm/drm_connector.h>
#include <drm/drm_crtc.h>
#include <drm/drm_mipi_dsi.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <video/mipi_display.h>
@@ -62,7 +61,6 @@ struct hx83102 {
const struct hx83102_panel_desc *desc;
- enum drm_panel_orientation orientation;
struct regulator *pp1800;
struct regulator *avee;
struct regulator *avdd;
@@ -1173,20 +1171,12 @@ static int hx83102_get_modes(struct drm_panel *panel,
return 1;
}
-static enum drm_panel_orientation hx83102_get_orientation(struct drm_panel *panel)
-{
- struct hx83102 *ctx = panel_to_hx83102(panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs hx83102_drm_funcs = {
.disable = hx83102_disable,
.unprepare = hx83102_unprepare,
.prepare = hx83102_prepare,
.enable = hx83102_enable,
.get_modes = hx83102_get_modes,
- .get_orientation = hx83102_get_orientation,
};
static int hx83102_bl_update_status(struct backlight_device *bl)
@@ -1265,10 +1255,6 @@ static int hx83102_panel_add(struct hx83102 *ctx)
ctx->base.prepare_prev_first = true;
- err = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
- if (err < 0)
- return dev_err_probe(dev, err, "failed to get orientation\n");
-
err = drm_panel_of_backlight(&ctx->base);
if (err)
return err;
@@ -21,7 +21,6 @@
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#define DRV_NAME "panel-himax-hx8394"
@@ -71,7 +70,6 @@ struct hx8394 {
struct gpio_desc *reset_gpio;
struct regulator *vcc;
struct regulator *iovcc;
- enum drm_panel_orientation orientation;
const struct hx8394_panel_desc *desc;
};
@@ -959,20 +957,12 @@ static int hx8394_get_modes(struct drm_panel *panel,
return 1;
}
-static enum drm_panel_orientation hx8394_get_orientation(struct drm_panel *panel)
-{
- struct hx8394 *ctx = panel_to_hx8394(panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs hx8394_drm_funcs = {
.disable = hx8394_disable,
.unprepare = hx8394_unprepare,
.prepare = hx8394_prepare,
.enable = hx8394_enable,
.get_modes = hx8394_get_modes,
- .get_orientation = hx8394_get_orientation,
};
static int hx8394_probe(struct mipi_dsi_device *dsi)
@@ -992,12 +982,6 @@ static int hx8394_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
"Failed to get reset gpio\n");
- ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
- if (ret < 0) {
- dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret);
- return ret;
- }
-
mipi_dsi_set_drvdata(dsi, ctx);
ctx->dev = dev;
@@ -11,7 +11,6 @@
#include <drm/drm_crtc.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
@@ -29,7 +28,6 @@ struct ili7836a_panel {
struct regulator_bulk_data *supplies;
struct gpio_desc *reset_gpio;
struct ili7836a_desc *desc;
- enum drm_panel_orientation orientation;
};
struct ili7836a_desc {
@@ -172,19 +170,11 @@ static int ili7836a_get_modes(struct drm_panel *panel,
return drm_connector_helper_get_modes_fixed(connector, ctx->desc->modes);
}
-static enum drm_panel_orientation ili7836a_get_orientation(struct drm_panel *panel)
-{
- struct ili7836a_panel *ctx = to_ili7836a_panel(panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs ili7836a_panel_funcs = {
.prepare = ili7836a_prepare,
.unprepare = ili7836a_unprepare,
.disable = ili7836a_disable,
.get_modes = ili7836a_get_modes,
- .get_orientation = ili7836a_get_orientation,
};
static int ili7836a_bl_update_status(struct backlight_device *bl)
@@ -250,12 +240,6 @@ static int ili7836a_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
"Failed to get reset-gpios\n");
- ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
- if (ret < 0) {
- dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret);
- return ret;
- }
-
ctx->dsi = dsi;
mipi_dsi_set_drvdata(dsi, ctx);
@@ -13,7 +13,6 @@
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
@@ -34,7 +33,6 @@ struct ili9488 {
struct gpio_desc *reset;
struct regulator_bulk_data supplies[2];
const struct ili9488_desc *desc;
- enum drm_panel_orientation orientation;
};
static const char * const regulator_names[] = {
@@ -193,18 +191,10 @@ static int ili9488_get_modes(struct drm_panel *panel, struct drm_connector *conn
return drm_connector_helper_get_modes_fixed(connector, mode);
}
-static enum drm_panel_orientation ili9488_get_orientation(struct drm_panel *panel)
-{
- struct ili9488 *ili = panel_to_ili9488(panel);
-
- return ili->orientation;
-}
-
static const struct drm_panel_funcs ili9488_funcs = {
.prepare = ili9488_prepare,
.unprepare = ili9488_unprepare,
.get_modes = ili9488_get_modes,
- .get_orientation = ili9488_get_orientation,
};
static int ili9488_dsi_probe(struct mipi_dsi_device *dsi)
@@ -238,10 +228,6 @@ static int ili9488_dsi_probe(struct mipi_dsi_device *dsi)
if (ret < 0)
return dev_err_probe(dev, ret, "failed to get regulators\n");
- ret = drm_of_get_panel_orientation(dev->of_node, &ili->orientation);
- if (ret)
- return dev_err_probe(dev, ret, "failed to get orientation\n");
-
ret = drm_panel_of_backlight(&ili->panel);
if (ret)
return dev_err_probe(dev, ret, "failed to get backlight\n");
@@ -9,7 +9,6 @@
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
@@ -28,7 +27,6 @@ struct ili9806e_dsi_panel_desc {
struct ili9806e_dsi_panel {
struct mipi_dsi_device *dsi;
const struct ili9806e_dsi_panel_desc *desc;
- enum drm_panel_orientation orientation;
};
static int ili9806e_dsi_on(struct ili9806e_dsi_panel *ili9806e)
@@ -99,18 +97,10 @@ static int ili9806e_dsi_get_modes(struct drm_panel *panel,
return drm_connector_helper_get_modes_fixed(connector, mode);
}
-static enum drm_panel_orientation ili9806e_dsi_get_orientation(struct drm_panel *panel)
-{
- struct ili9806e_dsi_panel *ctx = ili9806e_get_transport(panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs ili9806e_dsi_funcs = {
.prepare = ili9806e_dsi_prepare,
.unprepare = ili9806e_dsi_unprepare,
.get_modes = ili9806e_dsi_get_modes,
- .get_orientation = ili9806e_dsi_get_orientation,
};
static int ili9806e_dsi_probe(struct mipi_dsi_device *dsi)
@@ -132,10 +122,6 @@ static int ili9806e_dsi_probe(struct mipi_dsi_device *dsi)
dsi->format = ctx->desc->format;
dsi->lanes = ctx->desc->lanes;
- ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
- if (ret)
- return dev_err_probe(dev, ret, "Failed to get orientation\n");
-
ret = ili9806e_probe(dev, ctx, &ili9806e_dsi_funcs,
DRM_MODE_CONNECTOR_DSI);
if (ret)
@@ -16,7 +16,6 @@
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <video/mipi_display.h>
@@ -56,7 +55,6 @@ struct ili9881c {
struct regulator *iovcc;
struct gpio_desc *reset;
- enum drm_panel_orientation orientation;
u8 address_mode;
};
@@ -2523,18 +2521,10 @@ static int ili9881c_get_modes(struct drm_panel *panel,
return 1;
}
-static enum drm_panel_orientation ili9881c_get_orientation(struct drm_panel *panel)
-{
- struct ili9881c *ctx = panel_to_ili9881c(panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs ili9881c_funcs = {
.prepare = ili9881c_prepare,
.unprepare = ili9881c_unprepare,
.get_modes = ili9881c_get_modes,
- .get_orientation = ili9881c_get_orientation,
};
static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
@@ -2569,17 +2559,10 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(&dsi->dev, PTR_ERR(ctx->reset),
"Couldn't get our reset GPIO\n");
- ret = drm_of_get_panel_orientation(dsi->dev.of_node, &ctx->orientation);
- if (ret) {
- dev_err(&dsi->dev, "%pOF: failed to get orientation: %d\n",
- dsi->dev.of_node, ret);
- return ret;
- }
-
ctx->address_mode = ctx->desc->default_address_mode;
- if (ctx->orientation == DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP) {
+ if (ctx->panel.orientation == DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP) {
ctx->address_mode ^= 0x03;
- ctx->orientation = DRM_MODE_PANEL_ORIENTATION_NORMAL;
+ ctx->panel.orientation = DRM_MODE_PANEL_ORIENTATION_NORMAL;
}
ctx->panel.prepare_prev_first = true;
@@ -13,7 +13,6 @@
#include <drm/drm_connector.h>
#include <drm/drm_crtc.h>
#include <drm/drm_mipi_dsi.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <video/mipi_display.h>
@@ -52,7 +51,6 @@ struct ili9882t {
const struct panel_desc *desc;
- enum drm_panel_orientation orientation;
struct regulator *pp3300;
struct regulator *pp1800;
struct regulator *avee;
@@ -978,20 +976,12 @@ static int ili9882t_get_modes(struct drm_panel *panel,
return 1;
}
-static enum drm_panel_orientation ili9882t_get_orientation(struct drm_panel *panel)
-{
- struct ili9882t *ili = to_ili9882t(panel);
-
- return ili->orientation;
-}
-
static const struct drm_panel_funcs ili9882t_funcs = {
.disable = ili9882t_disable,
.unprepare = ili9882t_unprepare,
.prepare = ili9882t_prepare,
.enable = ili9882t_enable,
.get_modes = ili9882t_get_modes,
- .get_orientation = ili9882t_get_orientation,
};
static int ili9882t_add(struct ili9882t *ili)
@@ -1024,12 +1014,6 @@ static int ili9882t_add(struct ili9882t *ili)
gpiod_set_value_cansleep(ili->enable_gpio, 0);
- err = drm_of_get_panel_orientation(dev->of_node, &ili->orientation);
- if (err < 0) {
- dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err);
- return err;
- }
-
err = drm_panel_of_backlight(&ili->base);
if (err)
return err;
@@ -45,7 +45,6 @@ struct jadard {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
const struct jadard_panel_desc *desc;
- enum drm_panel_orientation orientation;
struct regulator *vdd;
struct regulator *vccio;
struct gpio_desc *reset;
@@ -164,19 +163,11 @@ static int jadard_get_modes(struct drm_panel *panel,
return drm_connector_helper_get_modes_fixed(connector, jadard->desc->mode_4ln);
}
-static enum drm_panel_orientation jadard_panel_get_orientation(struct drm_panel *panel)
-{
- struct jadard *jadard = panel_to_jadard(panel);
-
- return jadard->orientation;
-}
-
static const struct drm_panel_funcs jadard_funcs = {
.disable = jadard_disable,
.unprepare = jadard_unprepare,
.prepare = jadard_prepare,
.get_modes = jadard_get_modes,
- .get_orientation = jadard_panel_get_orientation,
};
static int radxa_display_8hd_ad002_init_cmds(struct jadard *jadard)
@@ -3235,10 +3226,6 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(&dsi->dev, PTR_ERR(jadard->vccio),
"failed to get vccio regulator\n");
- ret = drm_of_get_panel_orientation(dev->of_node, &jadard->orientation);
- if (ret < 0)
- return dev_err_probe(dev, ret, "failed to get orientation\n");
-
ret = drm_panel_of_backlight(&jadard->panel);
if (ret)
return ret;
@@ -37,7 +37,6 @@ struct panel_lvds {
struct gpio_desc *enable_gpio;
struct gpio_desc *reset_gpio;
- enum drm_panel_orientation orientation;
};
static inline struct panel_lvds *to_panel_lvds(struct drm_panel *panel)
@@ -101,18 +100,10 @@ static int panel_lvds_get_modes(struct drm_panel *panel,
return 1;
}
-static enum drm_panel_orientation panel_lvds_get_orientation(struct drm_panel *panel)
-{
- struct panel_lvds *lvds = to_panel_lvds(panel);
-
- return lvds->orientation;
-}
-
static const struct drm_panel_funcs panel_lvds_funcs = {
.unprepare = panel_lvds_unprepare,
.prepare = panel_lvds_prepare,
.get_modes = panel_lvds_get_modes,
- .get_orientation = panel_lvds_get_orientation,
};
static int panel_lvds_parse_dt(struct panel_lvds *lvds)
@@ -120,12 +111,6 @@ static int panel_lvds_parse_dt(struct panel_lvds *lvds)
struct device_node *np = lvds->dev->of_node;
int ret;
- ret = drm_of_get_panel_orientation(np, &lvds->orientation);
- if (ret < 0) {
- dev_err(lvds->dev, "%pOF: failed to get orientation %d\n", np, ret);
- return ret;
- }
-
ret = of_get_drm_panel_display_mode(np, &lvds->dmode, &lvds->bus_flags);
if (ret < 0) {
dev_err(lvds->dev, "%pOF: problems parsing panel-timing (%d)\n",
@@ -19,7 +19,6 @@
#include <drm/drm_crtc.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#define DSI_NUM_MIN 1
@@ -28,7 +27,6 @@ struct panel_info {
struct drm_panel panel;
struct mipi_dsi_device *dsi[2];
const struct panel_desc *desc;
- enum drm_panel_orientation orientation;
struct gpio_desc *reset_gpio;
struct backlight_device *backlight;
@@ -1087,19 +1085,11 @@ static int nt36523_get_modes(struct drm_panel *panel,
return pinfo->desc->num_modes;
}
-static enum drm_panel_orientation nt36523_get_orientation(struct drm_panel *panel)
-{
- struct panel_info *pinfo = to_panel_info(panel);
-
- return pinfo->orientation;
-}
-
static const struct drm_panel_funcs nt36523_panel_funcs = {
.disable = nt36523_disable,
.prepare = nt36523_prepare,
.unprepare = nt36523_unprepare,
.get_modes = nt36523_get_modes,
- .get_orientation = nt36523_get_orientation,
};
static int nt36523_bl_update_status(struct backlight_device *bl)
@@ -1207,12 +1197,6 @@ static int nt36523_probe(struct mipi_dsi_device *dsi)
pinfo->dsi[0] = dsi;
mipi_dsi_set_drvdata(dsi, pinfo);
- ret = drm_of_get_panel_orientation(dev->of_node, &pinfo->orientation);
- if (ret < 0) {
- dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret);
- return ret;
- }
-
pinfo->panel.prepare_prev_first = true;
if (pinfo->desc->has_dcs_backlight) {
@@ -20,7 +20,6 @@
#include <drm/drm_connector.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
@@ -32,7 +31,6 @@ struct renesas_r63419_panel {
struct gpio_desc *reset_gpio;
struct regulator_bulk_data *vdd_supplies;
struct regulator_bulk_data *vcc_supplies;
- enum drm_panel_orientation orientation;
};
/* VDDIO/VDD Supplies */
@@ -215,20 +213,11 @@ static int renesas_r63419_get_modes(struct drm_panel *panel,
return drm_connector_helper_get_modes_fixed(connector, mode);
}
-static enum drm_panel_orientation
-renesas_r63419_get_orientation(struct drm_panel *panel)
-{
- struct renesas_r63419_panel *ctx = to_renesas_r63419_panel(panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs renesas_r63419_panel_funcs = {
.disable = renesas_r63419_disable,
.prepare = renesas_r63419_prepare,
.unprepare = renesas_r63419_unprepare,
.get_modes = renesas_r63419_get_modes,
- .get_orientation = renesas_r63419_get_orientation,
};
static int renesas_r63419_probe(struct mipi_dsi_device *dsi)
@@ -292,12 +281,6 @@ static int renesas_r63419_probe(struct mipi_dsi_device *dsi)
ctx->dsi[0] = dsi;
mipi_dsi_set_drvdata(dsi, ctx);
- /* Get panel orientation */
- ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
- if (ret < 0 && ret != -ENODEV)
- return dev_err_probe(dev, ret,
- "Failed to get panel orientation\n");
-
ctx->panel.prepare_prev_first = true;
ret = drm_panel_of_backlight(&ctx->panel);
@@ -161,7 +161,6 @@ struct panel_simple {
struct drm_display_mode override_mode;
- enum drm_panel_orientation orientation;
};
static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
@@ -399,20 +398,12 @@ static int panel_simple_get_modes(struct drm_panel *panel,
return num;
}
-static enum drm_panel_orientation panel_simple_get_orientation(struct drm_panel *panel)
-{
- struct panel_simple *p = to_panel_simple(panel);
-
- return p->orientation;
-}
-
static const struct drm_panel_funcs panel_simple_funcs = {
.disable = panel_simple_disable,
.unprepare = panel_simple_unprepare,
.prepare = panel_simple_prepare,
.enable = panel_simple_enable,
.get_modes = panel_simple_get_modes,
- .get_orientation = panel_simple_get_orientation,
};
static struct panel_desc *panel_dpi_probe(struct device *dev)
@@ -669,12 +660,6 @@ static struct panel_simple *panel_simple_probe(struct device *dev)
return dev_err_cast_probe(dev, panel->enable_gpio,
"failed to request GPIO\n");
- err = drm_of_get_panel_orientation(dev->of_node, &panel->orientation);
- if (err) {
- dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err);
- return ERR_PTR(err);
- }
-
ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
if (ddc) {
panel->ddc = of_find_i2c_adapter_by_node(ddc);
@@ -7,7 +7,6 @@
#include <drm/drm_mipi_dbi.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <linux/bitfield.h>
@@ -139,7 +138,6 @@ struct st7701 {
struct regulator_bulk_data supplies[2];
struct gpio_desc *reset;
unsigned int sleep_delay;
- enum drm_panel_orientation orientation;
int (*write_command)(struct st7701 *st7701, u8 cmd, const u8 *seq,
size_t len);
@@ -638,20 +636,12 @@ static int st7701_get_modes(struct drm_panel *panel,
return 1;
}
-static enum drm_panel_orientation st7701_get_orientation(struct drm_panel *panel)
-{
- struct st7701 *st7701 = panel_to_st7701(panel);
-
- return st7701->orientation;
-}
-
static const struct drm_panel_funcs st7701_funcs = {
.disable = st7701_disable,
.unprepare = st7701_unprepare,
.prepare = st7701_prepare,
.enable = st7701_enable,
.get_modes = st7701_get_modes,
- .get_orientation = st7701_get_orientation,
};
static const struct drm_display_mode ts8550b_mode = {
@@ -1291,10 +1281,6 @@ static int st7701_probe(struct device *dev, int connector_type)
return PTR_ERR(st7701->reset);
}
- ret = drm_of_get_panel_orientation(dev->of_node, &st7701->orientation);
- if (ret < 0)
- return dev_err_probe(dev, ret, "Failed to get orientation\n");
-
st7701->panel.prepare_prev_first = true;
/**
@@ -20,7 +20,6 @@
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#define DRV_NAME "panel-sitronix-st7703"
@@ -62,7 +61,6 @@ struct st7703 {
struct dentry *debugfs;
const struct st7703_panel_desc *desc;
- enum drm_panel_orientation orientation;
};
struct st7703_panel_desc {
@@ -878,20 +876,12 @@ static int st7703_get_modes(struct drm_panel *panel,
return 1;
}
-static enum drm_panel_orientation st7703_get_orientation(struct drm_panel *panel)
-{
- struct st7703 *st7703 = panel_to_st7703(panel);
-
- return st7703->orientation;
-}
-
static const struct drm_panel_funcs st7703_drm_funcs = {
.disable = st7703_disable,
.unprepare = st7703_unprepare,
.prepare = st7703_prepare,
.enable = st7703_enable,
.get_modes = st7703_get_modes,
- .get_orientation = st7703_get_orientation,
};
static int allpixelson_set(void *data, u64 val)
@@ -969,10 +959,6 @@ static int st7703_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(dev, PTR_ERR(ctx->iovcc),
"Failed to request iovcc regulator\n");
- ret = drm_of_get_panel_orientation(dsi->dev.of_node, &ctx->orientation);
- if (ret < 0)
- return dev_err_probe(&dsi->dev, ret, "Failed to get orientation\n");
-
ret = drm_panel_of_backlight(&ctx->panel);
if (ret)
return ret;
@@ -14,7 +14,6 @@
#include <drm/drm_device.h>
#include <drm/drm_modes.h>
-#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#define ST7789V_RAMCTRL_CMD 0xb0
@@ -130,7 +129,6 @@ struct st7789v {
struct spi_device *spi;
struct gpio_desc *reset;
struct regulator *power;
- enum drm_panel_orientation orientation;
};
enum st7789v_prefix {
@@ -364,13 +362,6 @@ static int st7789v_get_modes(struct drm_panel *panel,
return 1;
}
-static enum drm_panel_orientation st7789v_get_orientation(struct drm_panel *p)
-{
- struct st7789v *ctx = panel_to_st7789v(p);
-
- return ctx->orientation;
-}
-
static int st7789v_prepare(struct drm_panel *panel)
{
struct st7789v *ctx = panel_to_st7789v(panel);
@@ -601,7 +592,6 @@ static const struct drm_panel_funcs st7789v_drm_funcs = {
.disable = st7789v_disable,
.enable = st7789v_enable,
.get_modes = st7789v_get_modes,
- .get_orientation = st7789v_get_orientation,
.prepare = st7789v_prepare,
.unprepare = st7789v_unprepare,
};
@@ -641,10 +631,6 @@ static int st7789v_probe(struct spi_device *spi)
if (ret)
return dev_err_probe(dev, ret, "Failed to get backlight\n");
- ret = drm_of_get_panel_orientation(spi->dev.of_node, &ctx->orientation);
- if (ret)
- return dev_err_probe(&spi->dev, ret, "Failed to get orientation\n");
-
drm_panel_add(&ctx->panel);
return 0;
@@ -11,7 +11,6 @@
#include <drm/display/drm_dsc.h>
#include <drm/display/drm_dsc_helper.h>
#include <drm/drm_mipi_dsi.h>
-#include <drm/drm_of.h>
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>
@@ -22,7 +21,6 @@ struct visionox_vtdr6130 {
struct mipi_dsi_device *dsi;
struct gpio_desc *reset_gpio;
struct regulator_bulk_data *supplies;
- enum drm_panel_orientation orientation;
struct visionox_vtdr6130_desc *desc;
};
@@ -370,18 +368,10 @@ static int visionox_vtdr6130_get_modes(struct drm_panel *panel,
return 1;
}
-static enum drm_panel_orientation visionox_vtdr6130_get_orientation(struct drm_panel *panel)
-{
- struct visionox_vtdr6130 *ctx = to_visionox_vtdr6130(panel);
-
- return ctx->orientation;
-}
-
static const struct drm_panel_funcs visionox_vtdr6130_panel_funcs = {
.prepare = visionox_vtdr6130_prepare,
.unprepare = visionox_vtdr6130_unprepare,
.get_modes = visionox_vtdr6130_get_modes,
- .get_orientation = visionox_vtdr6130_get_orientation,
};
static int visionox_vtdr6130_bl_update_status(struct backlight_device *bl)
@@ -447,12 +437,6 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
dsi->mode_flags = ctx->desc->mode_flags;
ctx->panel.prepare_prev_first = true;
- ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
- if (ret < 0) {
- dev_err(dev, "Failed to get orientation %d\n", ret);
- return ret;
- }
-
ctx->panel.backlight = visionox_vtdr6130_create_backlight(dsi);
if (IS_ERR(ctx->panel.backlight))
return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight),