Displaying 6 results from an estimated 6 matches for "input_clk".
2016 Aug 22
10
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
...+
+static void
+nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value)
+{
+ struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev;
+ struct nouveau_drm *drm = nouveau_drm(drm_dev);
+ struct nvif_object *device = &drm->device.object;
+
+ u32 input_clk = 27e6; /* PDISPLAY.SOR[1].PWM is connected to the crystal */
+ u32 freq = 100; /* this is what nvidia uses and it should be good-enough */
+ u32 div, duty;
+
+ div = input_clk / freq;
+ duty = value * div / LED_FULL;
+
+ /* for now, this is safe to directly poke those registers because:
+ * - A:...
2016 Aug 23
1
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
..._brightness value)
>> +{
>> + struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev;
>> + struct nouveau_drm *drm = nouveau_drm(drm_dev);
>> + struct nvif_object *device = &drm->device.object;
>> +
>> + u32 input_clk = 27e6; /* PDISPLAY.SOR[1].PWM is connected to the crystal */
>> + u32 freq = 100; /* this is what nvidia uses and it should be good-enough */
>> + u32 div, duty;
>> +
>> + div = input_clk / freq;
>> + duty = value * div / LED_FULL;
>> +
&...
2016 Aug 22
0
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
...+
+static void
+nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value)
+{
+ struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev;
+ struct nouveau_drm *drm = nouveau_drm(drm_dev);
+ struct nvif_object *device = &drm->device.object;
+
+ u32 input_clk = 27e6; /* PDISPLAY.SOR[1].PWM is connected to the crystal */
+ u32 freq = 100; /* this is what nvidia uses and it should be good-enough */
+ u32 div, duty;
+
+ div = input_clk / freq;
+ duty = value * div / LED_FULL;
+
+ /* for now, this is safe to directly poke those registers because:
+ * - A:...
2016 May 03
0
[PATCH] drm/nouveau: add a LED driver for the NVIDIA logo
..._classdev *led, enum led_brightness value)
> +{
> + struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev;
> + struct nouveau_drm *drm = nouveau_drm(drm_dev);
> + struct nvif_object *device = &drm->device.object;
> +
> + u32 input_clk = 27e6; /* PDISPLAY.SOR[1].PWM is connected to the crystal */
> + u32 freq = 100; /* this is what nvidia uses and it should be good-enough */
> + u32 div, duty;
> +
> + div = input_clk / freq;
> + duty = value * div / LED_FULL;
> +
> + /* for now,...
2016 Aug 23
0
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
..._classdev *led, enum led_brightness value)
> +{
> + struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev;
> + struct nouveau_drm *drm = nouveau_drm(drm_dev);
> + struct nvif_object *device = &drm->device.object;
> +
> + u32 input_clk = 27e6; /* PDISPLAY.SOR[1].PWM is connected to the crystal */
> + u32 freq = 100; /* this is what nvidia uses and it should be good-enough */
> + u32 div, duty;
> +
> + div = input_clk / freq;
> + duty = value * div / LED_FULL;
> +
> + /* for now,...
2016 May 07
0
[PATCH] drm/nouveau: add a LED driver for the NVIDIA logo
..._classdev *led, enum led_brightness value)
> +{
> + struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev;
> + struct nouveau_drm *drm = nouveau_drm(drm_dev);
> + struct nvif_object *device = &drm->device.object;
> +
> + u32 input_clk = 27e6; /* PDISPLAY.SOR[1].PWM is connected to the crystal */
shouldn't that be like 0x27e6 ?
> + u32 freq = 100; /* this is what nvidia uses and it should be good-enough */
> + u32 div, duty;
> +
> + div = input_clk / freq;
> + duty = value * div / LED_...