Skip to contentSkip to conversation

drm/gma500: Add generic code for clock calculation

PATCH New Patrik Jakobsson 1 participant 1 message Jul 16, 2013

Subsystems (3)
lore
Share & tools
lore

Patrik Jakobsson

author maintainer
#0 lore raw

PATCH 1/30 drm/gma500: Add generic code for clock calculation

This patch aims to unify the bits and pieces that are common (or similar enough) for pll clock calculations. Nothing makes use of this code yet That will come in later patches.

---
 drivers/gpu/drm/gma500/Makefile            |   1 +
 drivers/gpu/drm/gma500/gma_display.c       | 143 +++++++++++++++++++++++++++++
 drivers/gpu/drm/gma500/gma_display.h       |  74 +++++++++++++++
 drivers/gpu/drm/gma500/psb_drv.h           |   2 +
 drivers/gpu/drm/gma500/psb_intel_display.c |   3 +
 drivers/gpu/drm/gma500/psb_intel_drv.h     |   3 +
 6 files changed, 226 insertions(+)
 create mode 100644 drivers/gpu/drm/gma500/gma_display.c
 create mode 100644 drivers/gpu/drm/gma500/gma_display.h
drivers/gpu/drm/gma500/Makefile +1 -0
index 7a2d40a..e9064dd 100644
@@ -15,6 +15,7 @@ gma500_gfx-y += \
 	  mmu.o \
 	  power.o \
 	  psb_drv.o \
+	  gma_display.o \
 	  psb_intel_display.o \
 	  psb_intel_lvds.o \
 	  psb_intel_modes.o \
drivers/gpu/drm/gma500/gma_display.c new file +143 -0

143 lines not on this page · raw message

drivers/gpu/drm/gma500/gma_display.h new file +74 -0

74 lines not on this page · raw message

drivers/gpu/drm/gma500/psb_drv.h +2 -0
index 6053b8a..eeed88c 100644
@@ -27,6 +27,7 @@
 #include <drm/gma_drm.h>
 #include "psb_reg.h"
 #include "psb_intel_drv.h"
+#include "gma_display.h"
 #include "intel_bios.h"
 #include "gtt.h"
 #include "power.h"
@@ -675,6 +676,7 @@ struct psb_ops {
 	/* Sub functions */
 	struct drm_crtc_helper_funcs const *crtc_helper;
 	struct drm_crtc_funcs const *crtc_funcs;
+	const struct gma_clock_funcs *clock_funcs;
 
 	/* Setup hooks */
 	int (*chip_setup)(struct drm_device *dev);
drivers/gpu/drm/gma500/psb_intel_display.c +3 -0
index 6666493..0f1d069 100644
@@ -1251,6 +1251,9 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
 	/* Set the CRTC operations from the chip specific data */
 	drm_crtc_init(dev, &psb_intel_crtc->base, dev_priv->ops->crtc_funcs);
 
+	/* Set the CRTC clock functions from chip specific data */
+	psb_intel_crtc->clock_funcs = dev_priv->ops->clock_funcs;
+
 	drm_mode_crtc_set_gamma_size(&psb_intel_crtc->base, 256);
 	psb_intel_crtc->pipe = pipe;
 	psb_intel_crtc->plane = pipe;
drivers/gpu/drm/gma500/psb_intel_drv.h +3 -0
index 4dcae42..bfe0408 100644
@@ -24,6 +24,7 @@
 #include <drm/drm_crtc.h>
 #include <drm/drm_crtc_helper.h>
 #include <linux/gpio.h>
+#include "gma_display.h"
 
 /*
  * Display related stuff
@@ -188,6 +189,8 @@ struct psb_intel_crtc {
 
 	/* Saved Crtc HW states */
 	struct psb_intel_crtc_state *crtc_state;
+
+	const struct gma_clock_funcs *clock_funcs;
 };
 
 #define to_psb_intel_crtc(x)	\
Signature · 6 lines
1.8.1.2

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel