Skip to content

Commit

Permalink
Merge tag 'drm-misc-next-2020-05-14' of git://anongit.freedesktop.org…
Browse files Browse the repository at this point in the history
…/drm/drm-misc into drm-next

drm-misc-next for 5.8:

UAPI Changes:

Cross-subsystem Changes:

 * dma-buf: use atomic64_fetch_add() for context id
 * Documentation: document bindings for ASUS ZOOT TM5P5, BOE NV133FHM-N62,
                  hpd-gpios

Core Changes:

Driver Changes:

 * drm/ast: fix supend; cleanups
 * drm/i2c: cleanups
 * drm/panel: add MODULE_LICENSE to panel-visinox-rm69299; add support for
              ASUS TM5P5i, BOE NV133FHM-N62i; fix size and bpp of BOE NV133FHM-N61
	      add hpd-gpio to panel-simple
 * drm/mcde: fix return value check in mcde_dsi_bind()
 * drm/mgag200: use managed drmm_mode_config_init(); cleanups
 * fbdev/pxa168fb: cleanups

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200514070819.GA6930@linux-uq9g
  • Loading branch information
Dave Airlie committed May 15, 2020
2 parents 80c9b58 + 1c530d4 commit 1493bdd
Show file tree
Hide file tree
Showing 20 changed files with 654 additions and 169 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/asus,z00t-tm5p5-nt35596.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ASUS Z00T TM5P5 NT35596 5.5" 1080×1920 LCD Panel

maintainers:
- Konrad Dybcio <konradybcio@gmail.com>

description: |+
This panel seems to only be found in the Asus Z00T
smartphone and we have no straightforward way of
actually getting the correct model number,
as no schematics are released publicly.
allOf:
- $ref: panel-common.yaml#

properties:
compatible:
const: asus,z00t-tm5p5-n35596
reg: true
reset-gpios: true
vdd-supply:
description: core voltage supply
vddio-supply:
description: vddio supply

required:
- compatible
- reg
- vdd-supply
- vddio-supply
- reset-gpios

additionalProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>
dsi {
#address-cells = <1>;
#size-cells = <0>;
panel@0 {
reg = <0>;
compatible = "asus,z00t-tm5p5-n35596";
vdd-supply = <&pm8916_l8>;
vddio-supply = <&pm8916_l6>;
reset-gpios = <&msmgpio 25 GPIO_ACTIVE_HIGH>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ properties:
(hot plug detect) signal, but the signal isn't hooked up so we should
hardcode the max delay from the panel spec when powering up the panel.

hpd-gpios:
maxItems: 1
description:
If Hot Plug Detect (HPD) is connected to a GPIO in the system rather
than a dedicated HPD pin the pin can be specified here.

# Control I/Os

# Many display panels can be controlled through pins driven by GPIOs. The nature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ properties:
- boe,nv101wxmn51
# BOE NV133FHM-N61 13.3" FHD (1920x1080) TFT LCD Panel
- boe,nv133fhm-n61
# BOE NV133FHM-N62 13.3" FHD (1920x1080) TFT LCD Panel
- boe,nv133fhm-n62
# BOE NV140FHM-N49 14.0" FHD a-Si FT panel
- boe,nv140fhmn49
# CDTech(H.K.) Electronics Limited 4.3" 480x272 color TFT-LCD panel
Expand Down
2 changes: 1 addition & 1 deletion drivers/dma-buf/dma-fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ EXPORT_SYMBOL(dma_fence_get_stub);
u64 dma_fence_context_alloc(unsigned num)
{
WARN_ON(!num);
return atomic64_add_return(num, &dma_fence_context_counter) - num;
return atomic64_fetch_add(num, &dma_fence_context_counter);
}
EXPORT_SYMBOL(dma_fence_context_alloc);

Expand Down
8 changes: 6 additions & 2 deletions drivers/gpu/drm/ast/ast_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,9 @@ static int ast_primary_plane_helper_atomic_check(struct drm_plane *plane,
return 0;
}

void ast_primary_plane_helper_atomic_update(struct drm_plane *plane,
struct drm_plane_state *old_state)
static void
ast_primary_plane_helper_atomic_update(struct drm_plane *plane,
struct drm_plane_state *old_state)
{
struct ast_private *ast = plane->dev->dev_private;
struct drm_plane_state *state = plane->state;
Expand Down Expand Up @@ -801,6 +802,9 @@ static int ast_crtc_helper_atomic_check(struct drm_crtc *crtc,
return -EINVAL;
}

if (!state->enable)
return 0; /* no mode checks if CRTC is being disabled */

ast_state = to_ast_crtc_state(state);

format = ast_state->format;
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i2c/tda998x_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,8 @@ static void tda998x_audio_shutdown(struct device *dev, void *data)
mutex_unlock(&priv->audio_mutex);
}

int tda998x_audio_digital_mute(struct device *dev, void *data, bool enable)
static int tda998x_audio_digital_mute(struct device *dev, void *data,
bool enable)
{
struct tda998x_priv *priv = dev_get_drvdata(dev);

Expand Down
7 changes: 3 additions & 4 deletions drivers/gpu/drm/mcde/mcde_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,10 +1073,9 @@ static int mcde_dsi_bind(struct device *dev, struct device *master,
panel = NULL;

bridge = of_drm_find_bridge(child);
if (IS_ERR(bridge)) {
dev_err(dev, "failed to find bridge (%ld)\n",
PTR_ERR(bridge));
return PTR_ERR(bridge);
if (!bridge) {
dev_err(dev, "failed to find bridge\n");
return -EINVAL;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/mgag200/mgag200_cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ int mgag200_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
uint32_t handle, uint32_t width, uint32_t height)
{
struct drm_device *dev = crtc->dev;
struct mga_device *mdev = (struct mga_device *)dev->dev_private;
struct mga_device *mdev = to_mga_device(dev);
struct drm_gem_object *obj;
struct drm_gem_vram_object *gbo = NULL;
int ret;
Expand Down Expand Up @@ -307,7 +307,7 @@ int mgag200_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,

int mgag200_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
{
struct mga_device *mdev = (struct mga_device *)crtc->dev->dev_private;
struct mga_device *mdev = to_mga_device(crtc->dev);

/* Our origin is at (64,64) */
x += 64;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/mgag200/mgag200_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int mgag200_driver_dumb_create(struct drm_file *file,
struct drm_device *dev,
struct drm_mode_create_dumb *args)
{
struct mga_device *mdev = dev->dev_private;
struct mga_device *mdev = to_mga_device(dev);
unsigned long pg_align;

if (WARN_ONCE(!dev->vram_mm, "VRAM MM not initialized"))
Expand Down
15 changes: 6 additions & 9 deletions drivers/gpu/drm/mgag200/mgag200_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ struct mga_crtc {
bool enabled;
};

struct mga_mode_info {
bool mode_config_initialized;
struct mga_crtc *crtc;
};

struct mga_i2c_chan {
struct i2c_adapter adapter;
struct drm_device *dev;
Expand Down Expand Up @@ -160,17 +155,14 @@ struct mga_device {
void __iomem *rmmio;

struct mga_mc mc;
struct mga_mode_info mode_info;

struct mga_cursor cursor;

size_t vram_fb_available;

bool suspended;
int num_crtc;
enum mga_type type;
int has_sdram;
struct drm_display_mode mode;

int bpp_shifts[4];

Expand All @@ -179,9 +171,15 @@ struct mga_device {
/* SE model number stored in reg 0x1e24 */
u32 unique_rev_id;

struct mga_connector connector;
struct drm_encoder encoder;
};

static inline struct mga_device *to_mga_device(struct drm_device *dev)
{
return dev->dev_private;
}

static inline enum mga_type
mgag200_type_from_driver_data(kernel_ulong_t driver_data)
{
Expand All @@ -196,7 +194,6 @@ mgag200_flags_from_driver_data(kernel_ulong_t driver_data)

/* mgag200_mode.c */
int mgag200_modeset_init(struct mga_device *mdev);
void mgag200_modeset_fini(struct mga_device *mdev);

/* mgag200_main.c */
int mgag200_driver_load(struct drm_device *dev, unsigned long flags);
Expand Down
10 changes: 5 additions & 5 deletions drivers/gpu/drm/mgag200/mgag200_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,34 +61,34 @@ static inline void mga_i2c_set(struct mga_device *mdev, int mask, int state)
static void mga_gpio_setsda(void *data, int state)
{
struct mga_i2c_chan *i2c = data;
struct mga_device *mdev = i2c->dev->dev_private;
struct mga_device *mdev = to_mga_device(i2c->dev);
mga_i2c_set(mdev, i2c->data, state);
}

static void mga_gpio_setscl(void *data, int state)
{
struct mga_i2c_chan *i2c = data;
struct mga_device *mdev = i2c->dev->dev_private;
struct mga_device *mdev = to_mga_device(i2c->dev);
mga_i2c_set(mdev, i2c->clock, state);
}

static int mga_gpio_getsda(void *data)
{
struct mga_i2c_chan *i2c = data;
struct mga_device *mdev = i2c->dev->dev_private;
struct mga_device *mdev = to_mga_device(i2c->dev);
return (mga_i2c_read_gpio(mdev) & i2c->data) ? 1 : 0;
}

static int mga_gpio_getscl(void *data)
{
struct mga_i2c_chan *i2c = data;
struct mga_device *mdev = i2c->dev->dev_private;
struct mga_device *mdev = to_mga_device(i2c->dev);
return (mga_i2c_read_gpio(mdev) & i2c->clock) ? 1 : 0;
}

struct mga_i2c_chan *mgag200_i2c_create(struct drm_device *dev)
{
struct mga_device *mdev = dev->dev_private;
struct mga_device *mdev = to_mga_device(dev);
struct mga_i2c_chan *i2c;
int ret;
int data, clock;
Expand Down
Loading

0 comments on commit 1493bdd

Please sign in to comment.