A display device comprising an optical sensor on an active matrix substrate, wherein the optical sensor includes: a photodetecting element, being a PIN diode (D1a), for receiving incident light; a reset signal line for supplying a reset signal (RSTa) to one terminal of the PIN diode (D1a) to reset the potential (Vinta) of an accumulation node to a predetermined potential, wherein the accumulation node is connected to the other terminal of the PIN diode (D1a); a capacitor (C1a) having a terminal connected to the accumulation node; a readout signal line for supplying a readout signal (RWSa) to the other terminal of the capacitor (C1a); a sensor switching element (M1a) having a control terminal connected to the accumulation node for reading out, according to the readout signal (RWSa), a photoelectric current corresponding to the amount of the incident light entering the PIN diode (D1a) during a period from terminal of the supply of the reset signal (RSTa) to the supply of the readout signal (RWSa); a light shielding film provided on a back side of the PIN diode (D1a); characterized by a light shielding film signal line connected to the light shielding film; and a driving circuit for switching a potential of the light shielding film between a high level potential and a low level potential via the light shielding film signal line; wherein the driving circuit is adapted to cause the light shielding film to have the high level potential during a period that at least partially overlaps a period while the reset signal (RSTa) is supplied to the reset signal line, wherein the following formula is satisfied: V LS_H ≥ V RST_H + V th_p where V LS_H represents the high level potential of the light shielding film, V RST_H represents a high level potential of the reset signal (RSTa), and V th_p represents a threshold voltage of an p-channel MOS transistor where a p-layer of the PIN diode (D1a) is a source-drain region and the light shielding film is a gate electrode, and wherein the following is satisfied: V RST_L + V th_p ≤ V LS_L ≤ V C + V th_n where V LS_L represents the low level potential of the light shielding film, V RST_L represents a low level potential of the reset signal (RSTa), V C represents a potential applied to an n-layer of the PIN diode (D1a) via the light shielding film signal line, V th_p represents a threshold voltage of a p-channel MOS transistor where a p-layer of the PIN diode (D1a) is a source-drain region and the light shielding film is a gate electrode, and V th_n represents a threshold value of an n-channel MOS transistor where the n-layer of the PIN diode (D1a) is a source-drain region and the light shielding film is a gate electrode. a photodetecting element, being a PIN diode (D1a), for receiving incident light; a reset signal line for supplying a reset signal (RSTa) to one terminal of the PIN diode (D1a) to reset the potential (Vinta) of an accumulation node to a predetermined potential, wherein the accumulation node is connected to the other terminal of the PIN diode (D1a); a capacitor (C1a) having a terminal connected to the accumulation node; a readout signal line for supplying a readout signal (RWSa) to the other terminal of the capacitor (C1a); a sensor switching element (M1a) having a control terminal connected to the accumulation node for reading out, according to the readout signal (RWSa), a photoelectric current corresponding to the amount of the incident light entering the PIN diode (D1a) during a period from terminal of the supply of the reset signal (RSTa) to the supply of the readout signal (RWSa); a light shielding film provided on a back side of the PIN diode (D1a); characterized by a light shielding film signal line connected to the light shielding film; and a driving circuit for switching a potential of the light shielding film between a high level potential and a low level potential via the light shielding film signal line; wherein the driving circuit is adapted to cause the light shielding film to have the high level potential during a period that at least partially overlaps a period while the reset signal (RSTa) is supplied to the reset signal line, wherein the following formula is satisfied: V LS_H ≥ V RST_H + V th_p where V LS_H represents the high level potential of the light shielding film, V RST_H represents a high level potential of the reset signal (RSTa), and V th_p represents a threshold voltage of an p-channel MOS transistor where a p-layer of the PIN diode (D1a) is a source-drain region and the light shielding film is a gate electrode, and wherein the following is satisfied: V RST_L + V th_p ≤ V LS_L ≤ V C + V th_n where V LS_L represents the low level potential of the light shielding film, V RST_L represents a low level potential of the reset signal (RSTa), V C represents a potential applied to an n-layer of the PIN diode (D1a) via the light shielding film signal line, V th_p represents a threshold voltage of a p-channel MOS transistor where a p-layer of the PIN diode (D1a) is a source-drain region and the light shielding film is a gate electrode, and V th_n represents a threshold value of an n-channel MOS transistor where the n-layer of the PIN diode (D1a) is a source-drain region and the light shielding film is a gate electrode.