]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'sunxi-drm-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git...
authorDave Airlie <airlied@redhat.com>
Thu, 20 Apr 2017 03:19:34 +0000 (13:19 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 20 Apr 2017 03:19:34 +0000 (13:19 +1000)
Allwinner DRM changes for 4.12

Not any functional changes, but a lot of preliminary rework in order to
support multiple display pipelines.

* tag 'sunxi-drm-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (26 commits)
  MAINTAINERS: Add sun4i-drm git repo
  drm/sun4i: Pass pointer for underlying backend into layer init
  drm/sun4i: Pass pointers for associated backend and tcon into crtc init
  drm/sun4i: tv: Get tcon and backend pointers from associated crtc
  drm/sun4i: Use embedded tcon pointer to get the tcon's output port node
  drm/sun4i: Fix tcon channel 0 comment about backporch = backporch + hsync
  drm/sun4i: Fix TCON clock and regmap initialization sequence
  drm/sun4i: Grab reserved memory region
  drm/sun4i: Add backend and tcon pointers to sun4i_crtc
  drm/sun4i: Add backend pointer to sun4i_layer
  drm/sun4i: rgb: Pass tcon pointer when initializing RGB encoder
  drm/sun4i: tv: Switch to drm_of_find_possible_crtcs
  drm/sun4i: Drop hardcoded .possible_crtcs values from layers
  drm/sun4i: Drop primary layer pointer from sun4i_drv
  drm/sun4i: Initialize crtc from tcon bind function
  drm/sun4i: Move layers from sun4i_drv to sun4i_crtc
  drm/sun4i: Add end of list element for sun4i_layers_init's returned list
  drm/sun4i: Set drm_crtc.port to the underlying TCON's output port node
  drm/sun4i: Make sunxi_rgb2yuv_coef constant
  drm/sun4i: Make sun4i_crtc_init return ERR_PTR style error codes
  ...

1  2 
MAINTAINERS
drivers/gpu/drm/sun4i/sun4i_drv.c
drivers/gpu/drm/sun4i/sun4i_rgb.c
drivers/gpu/drm/sun4i/sun4i_tcon.c

diff --cc MAINTAINERS
Simple merge
index 329ea56106a5c1e546d4dbd9b0f654884f0b3b6d,767bbadcc85d5ec5bdb790081abdc2bbd7381b07..8ddd72cd58736e3f6e0935087cccdab802e6dd96
  #include <drm/drm_fb_helper.h>
  #include <drm/drm_of.h>
  
- #include "sun4i_crtc.h"
  #include "sun4i_drv.h"
  #include "sun4i_framebuffer.h"
- #include "sun4i_layer.h"
+ #include "sun4i_tcon.h"
  
 -static const struct file_operations sun4i_drv_fops = {
 -      .owner          = THIS_MODULE,
 -      .open           = drm_open,
 -      .release        = drm_release,
 -      .unlocked_ioctl = drm_ioctl,
 -      .compat_ioctl   = drm_compat_ioctl,
 -      .poll           = drm_poll,
 -      .read           = drm_read,
 -      .llseek         = no_llseek,
 -      .mmap           = drm_gem_cma_mmap,
 -};
 +DEFINE_DRM_GEM_CMA_FOPS(sun4i_drv_fops);
  
  static struct drm_driver sun4i_drv_driver = {
        .driver_features        = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_ATOMIC,
index 46280dd70c9e05800aed87a6de4e512066da46e9,1147451eb993339ad5e7df6f985821b5319e9b0b..67f0b91a99de057933583d8aa786f23c73cb1af8
  #include <drm/drmP.h>
  #include <drm/drm_atomic_helper.h>
  #include <drm/drm_crtc_helper.h>
 +#include <drm/drm_of.h>
  #include <drm/drm_panel.h>
  
- #include "sun4i_drv.h"
+ #include "sun4i_crtc.h"
  #include "sun4i_tcon.h"
  #include "sun4i_rgb.h"
  
@@@ -216,12 -207,12 +208,12 @@@ int sun4i_rgb_init(struct drm_device *d
        rgb = devm_kzalloc(drm->dev, sizeof(*rgb), GFP_KERNEL);
        if (!rgb)
                return -ENOMEM;
-       rgb->drv = drv;
+       rgb->tcon = tcon;
        encoder = &rgb->encoder;
  
 -      tcon->panel = sun4i_tcon_find_panel(tcon->dev->of_node);
 -      bridge = sun4i_tcon_find_bridge(tcon->dev->of_node);
 -      if (IS_ERR(tcon->panel) && IS_ERR(bridge)) {
 +      ret = drm_of_find_panel_or_bridge(tcon->dev->of_node, 1, 0,
 +                                        &tcon->panel, &bridge);
 +      if (ret) {
                dev_info(drm->dev, "No panel or bridge found... RGB output disabled\n");
                return 0;
        }
        }
  
        /* The RGB encoder can only work with the TCON channel 0 */
-       rgb->encoder.possible_crtcs = BIT(0);
+       rgb->encoder.possible_crtcs = BIT(drm_crtc_index(&tcon->crtc->crtc));
  
 -      if (!IS_ERR(tcon->panel)) {
 +      if (tcon->panel) {
                drm_connector_helper_add(&rgb->connector,
                                         &sun4i_rgb_con_helper_funcs);
                ret = drm_connector_init(drm, &rgb->connector,
Simple merge